I just freshly installed Node.js and now I\'m trying to run a simple script, but I get the following error message:
Error: require.paths is removed. Use node
In my case, I have an old local (user-specific) installation of coffee-script
.
Here's what I did :
~/.node_modules
folder~/bin
foldercoffee-script
: sudo npm install --global coffee-script
Now it works :)
This error happens when some installed packages are built for an older version of nodejs.
Which version of node are you using?
$ node -v
Are you using npm (http://npmjs.org) to install packages? The output of install express should be like this:
$ npm install express
npm http GET https://registry.npmjs.org/express
npm http 200 https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/mime/1.2.4
npm http GET https://registry.npmjs.org/mkdirp/0.3.0
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/connect
npm http 304 https://registry.npmjs.org/mime/1.2.4
npm http 304 https://registry.npmjs.org/mkdirp/0.3.0
npm http 304 https://registry.npmjs.org/qs
npm http 200 https://registry.npmjs.org/connect
npm http GET https://registry.npmjs.org/connect/-/connect-1.9.0.tgz
npm http 200 https://registry.npmjs.org/connect/-/connect-1.9.0.tgz
npm http GET https://registry.npmjs.org/formidable
npm http 304 https://registry.npmjs.org/formidable
express@2.5.10 ./node_modules/express
├── qs@0.4.2
├── mkdirp@0.3.0
├── mime@1.2.4
└── connect@1.9.0 (formidable@1.0.11)