I'm trying to install i18next-conv but, when I run sudo npm install i18next-conv -g, I get this error:
Error: Cannot find module 'readable-stream'
at Function._resolveFilename (module.js:337:11)
at Function._load (module.js:279:25)
at Module.require (module.js:359:17)
at require (module.js:375:17)
at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/sha/index.js:3:48)
at Module._compile (module.js:446:26)
at Object..js (module.js:464:10)
at Module.load (module.js:353:31)
at Function._load (module.js:311:12)
at Module.require (module.js:359:17)
If you need help, you may report this log at:
<http://github.com/isaacs/npm/issues>
or email it to:
<npm-#googlegroups.com>
System Darwin 11.4.2
command "node" "/usr/local/bin/npm" "install" "i18next-conv" "-g"
cwd /Users/personalcomputer/Desktop
node -v v0.6.18
npm -v 1.3.5
Additional logging details can be found in:
/Users/personalcomputer/Desktop/npm-debug.log
not ok code undefined
not ok code 1
Can anyone tell me what can I do to install it?
Thanks!
I think this should be solved if you update node.js and possibly npm as well.
Note you can update npm with npm itself via the command:
sudo npm install -g npm
What I had to do was update node version from node web page
Related
Getting below error while "npm run build" on server.On local machine working fine. Getting 500 response on server
node version:8.0
npm version: 5.0.3
Error: Cannot find module 'has-flag'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous>
(/usr/share/../../../node_modules/postcss/node_modules/supports-color/index.js:2:15)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ***#0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ***#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Try npm install --save has-flag. It looks like supports-color is requiring has-flag to be installed but it isn't. If you need to install any other packages you can just type npm install.
The above didn't work for me, but deleting my node_modules and dist folders and rerunning npm install did.
I'm new to node.js, and I've been trying to npm install some modules - namely, cheerio, express and request. But I keep getting this:
npm WARN package.json node-web-scrape#0.0.1 No repository field.
npm WARN package.json node-web-scrape#0.0.1 No README data
npm WARN package.json node-web-scrape#0.0.1 No license field.
npm WARN retry will retry, error on last attempt: Error: EBUSY: resource busy or locked, rename 'C:\Users\user\AppData\Local\Temp\npm-16500-38020820\registry.npmjs.org\jsdom\-\jsdom-7.2.2.tgz.1538180439' -> 'C:\Users\user\AppData\Local\Temp\npm-16500-38020820\registry.npmjs.org\jsdom\-\jsdom-7.2.2.tgz'
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "cheerio"
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
But the folder node_modules still appears in my directory. So OK, I try stuff on it. My main.js file has the following:
var request = require('request');
console.log("Hello, World!")
That's all it's got. Immediately, it breaks:
C:\Users\user\Documents\Crawler>node main
module.js:327
throw err;
^
Error: Cannot find module 'process-nextick-args'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (C:\Users\user\Documents\Crawler\node_modules\request\node_modules\bl\node_modules\readable-stream\lib\_stream_duplex.js:21:23)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
Help?
Since you're using npm version 2.15.8, windows has a limit of folder depth. Update your npm to npm#3.
npm install -g npm#3
npm cache clear
Then, delete your node_modules/ before installing the npm modules(cheerio, express, request)
Source: BountySource
Background
I just upgraded from Node.js v4.1.1 to v5.0.0 on my Mac. I used the node-v5.0.0.pkg installer from the node website because I don't have nvm or n installed, and I didn't install through Homebrew or MacPorts).
Problem
Now, every time I run npm I get the following error in my terminal:
Error: Cannot find module './lib'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/node_modules/hawk/index.js:1:80)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm"
npm ERR! node v5.0.0
npm ERR! npm v3.3.6
npm ERR! code MODULE_NOT_FOUND
npm ERR! Cannot find module './lib'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
I can't even re-install NPM through the traditional method of running npm install -g npm because the package manager itself doesn't work.
How do I get NPM working again on my Mac?
Solution:
rm -rf /usr/local/lib/node_modules/npm
Reinstall node js v5.0.0
Other notes:
Looks like other people are running in to the same problem (see issue #3606). It sounds like a fix is in the works, so this issue will probably be resolved in the next release. In the interim, the only solution is to completely purge npm from your system and reinstall.
I had to reinstall Nodejs on my Macbook when I ran into an issue with npm.
No matter what I did I always got this output:
$ npm
Error: Cannot find module 'mime-db'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/index.js:2:10)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! code MODULE_NOT_FOUND
npm ERR! Cannot find module 'mime-db'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
I did not understand who this was happening. So I installed it one more time in hope that it would be fixed. No luck.
I did fix it after a wasting to much time. That is why I put it on here so that if anybody may walk into the same problem they solve it sooner then I did.
I used following command on node command prompt
npm install mime-db
It gave me warning: unmet dependency that it requires version 1.12 of mime-db, but it will download version 1.21 of mime-db
i ran the same command again i.e.
npm install mime-db
It solved my issue
Good Luck.
Another solution:
I was trying out something else, then I upgraded node package, downloading from node website and installing it, then i did not face this issue.
Thank you
After looking in the repo of mime-db and saw that I was missing this file in the module that was installed with the pkg. I added this file and now it works.
Good luck!
I deleted mime-db from the node_modules folder. Then I ran
npm i mime-db
That solved my problem.
I'm trying to install i18next-conv but, when I run sudo npm install i18next-conv -g, I get this error:
Error: Cannot find module 'readable-stream'
at Function._resolveFilename (module.js:337:11)
at Function._load (module.js:279:25)
at Module.require (module.js:359:17)
at require (module.js:375:17)
at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/sha/index.js:3:48)
at Module._compile (module.js:446:26)
at Object..js (module.js:464:10)
at Module.load (module.js:353:31)
at Function._load (module.js:311:12)
at Module.require (module.js:359:17)
If you need help, you may report this log at:
<http://github.com/isaacs/npm/issues>
or email it to:
<npm-#googlegroups.com>
System Darwin 11.4.2
command "node" "/usr/local/bin/npm" "install" "i18next-conv" "-g"
cwd /Users/personalcomputer/Desktop
node -v v0.6.18
npm -v 1.3.5
Additional logging details can be found in:
/Users/personalcomputer/Desktop/npm-debug.log
not ok code undefined
not ok code 1
Can anyone tell me what can I do to install it?
Thanks!
I think this should be solved if you update node.js and possibly npm as well.
Note you can update npm with npm itself via the command:
sudo npm install -g npm
What I had to do was update node version from node web page