Nodejs error: Cannot find module ‘iconv-lite’
Nodejs Version: Wenchuan earthquake on May 12
var iconv = require("iconv-lite");
It is correct to execute the statement directly in node.
However, put this statement in
iconv_test.jsThis is the only sentence in the document.
iconv_test.jsThe file will go wrong.
What is going on here?
Thank@krewReminder, I put the folder containing iconv-lite package
node_modulesAfter copying to the same directory of js program files, the problem is solved!
Nodejs’s package management mechanism is really wonderful. If you write a program like this, you have to copy the required package once, which will not make the disk inside full of node packages ~