I honestly dont even know what question I should be asking here, but npm run build fails
> color-organizer#1.0.0 build /home/francis/Desktop/react/chapter-
06/color-organizer
> webpack --progress
module.js:471
throw err;
^
Error: Cannot find module 'set-blocking'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/francis/.nvm/versions/node/v5.0.0/lib/node_modules/webpack/node_modules/yargs/lib/usage.js:5:21)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
node -v gives me
v6.11.0
so its weird that i see 5 in this error log. I do need to note that i was running on 5 before, and just recently upgraded to 6.11 in the middle of this problem
i'm on ubuntu 16.04
i'm just trying to follow these examples https://github.com/MoonHighway/learning-react/ and start a server for 6, but i can't
and its pissing me off
Running npm install fixed the error for me using the latest versions. Otherwise you may try the command npm install set-blocking or npm install set-blocking --save-dev to only install the module as a developer dependency.
Related
I am starts working on expressJs nodeJs but stuck at a beginning point to run the node server.js command. I think any module is missing to install but i`m not recognize which one is missing.Im working on linux(ubuntu) operating system. Please help me to out this problem.
iron#iron-System-Product-Name:/media/iron/1d6c195f-2350-423c-a3f0-0500c92e580a/admin-panel/node-admin-master$ node server.js
module.js:442
throw err;
^
Error: Cannot find module '/media/iron/1d6c195f-2350-423c-a3f0-0500c92e580a/admin-panel/node-admin-master/config/env/undefined'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/media/iron/1d6c195f-2350-423c-a3f0-0500c92e580a/admin-panel/node-admin-master/config/routes.js:6:14)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/media/iron/1d6c195f-2350-423c-a3f0-0500c92e580a/admin-panel/node-admin-master/server.js:14:13)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
Node Version: v6.2.2
Npm version: 3.9.5
it take undefined of variable which may you declare in config/env/undefined.
Please check your env file or if possible share with me .
Thanks
With the error, i suspect you are missing iron-node module.
To simply install in project, run
npm i iron-node
to install and save it in the project's package.json, run:
npm i iron-node --save
to install it in your computer, do:
npm i -g iron-node
However, since this is a development dependency, you should install it as one and save it in package.json, by:
npm i iron-node -D --save
I am using npm for quite a while now, but this morning when I run npm init I get this error :
module.js:549
throw err;
^
Error: Cannot find module '../lib/utils/unsupported.js'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at /usr/local/lib/node_modules/npm/bin/npm-cli.js:19:21
at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm- cli.js:92:3)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
Somebody helps me!
As the error error trace that is displayed is referencing a missing path (../lib/utils/unsupported.js), I simply decided to remove nodejs and npm altogether following the answer here
How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)
After removing nodejs and npm I reinstall them using the node-v8.11.pkg installer.
It's npm init is now working fine.
When I run any heroku command or open a page where user is not signed in. This is the only error I'm getting over and over again.
I did remove the Heroku tmp today but I pushed the app fine afterwards, the error suddenly happened.
When i go to the app it opens up if the user is signed in but when opened incognito it has an error, checking the logs it's the same error below
Can anyone help me out on this one?
module.js:491
throw err;
Error: Cannot find module 'universalify'
at Function.Module._resolveFilename (module.js:489:15)
at Function.Module._load (module.js:439:25)
at Module.require (module.js:517:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/ubuntu/.local/share/heroku/client/node_modules/fs-extra/lib/fs/index.js:3:11)
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)
module.js:491
throw err;
^
Error: Cannot find module 'universalify'
at Function.Module._resolveFilename (module.js:489:15)
at Function.Module._load (module.js:439:25)
at Module.require (module.js:517:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/ubuntu/.local/share/heroku/client/node_modules/fs-extra/lib/fs/index.js:3:11)
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)
! error getting commands pid 14405 exit 1
Try adding this to package.json and rebuild instanses:
"universalify": "^0.1.1"
or run this command on your server and restart node.js:
npm install universalify --save
I will advice you run these on your terminal in your CWD of the preoject npm uninstall universalify -S --save, which should remove any form of universalify that probably had some missing dependencies during your npm install, after which you can then run npm install universalify --save.
Don't hesitate to comment if you encounter any further challenge.
I was also having this error last time when i'm still doing my project on node . So what i did was . Install every npm that is missing so something like this
npm install universalify --save
If it still persist. Delete the folder of the universalify and reinstall npm again :) . And don't forget to delete it also on your package.json
module.js:471
throw err;
^
Error: Cannot find module 'process-nextick-args'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/ubuntu/.nvm/versions/node/v6.11.2/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_readable.js:26:23)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
Uh oh! npm had a problem! { Error: Command failed: "/home/ubuntu/.nvm/versions/node/v6.11.2/bin/npm" --version
module.js:471
throw err;
Trying to do FCC first challenge of node.js but stuck at installing and verifying npm. tried to google the error to debug it but found only questions no answer to it! could anybody help?
It looks like a bug on npm. I recommend to update Node.js and npm.
Run following commands on console:
$ nvm install 6 # This installs Node.js version 6.11.3, current latest version of Node.js 6.x
$ npm install --global npm # Install latest version of npm
I found this issue happen on other learners of Free Code Camp
I have installed node js on my windows 10 machine, and the version is v4.4.2 but when I try to run npm install or even check npm version it throwing the following error. Any help would be greatly appreciated
Error: Cannot find module 'readable-stream'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:286:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (C:\Users\nmadasu\AppData\Roaming\npm\node_modules\npm
\node_modules\are-we-there-yet\index.js:2:14)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
Also, after reading other solutions to this problem, npm install gulp -g, npm install 'readable-stream' or any other suggestion I read and tried did not work. It appears any command I try with npm throws the error below.
Error: Cannot find module 'readable-stream'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:286:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (C:\Users\nmadasu\AppData\Roaming\npm\node_modules\npm
\node_modules\are-we-there-yet\index.js:2:14)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
I have also tried uninstalling node and reinstalling and same issue persists.
I figured it out, when I uninstalld I did not delete all the files. There were the node/npm files in my C: directory and failed to realize there were a bunch of npm module files in my / directory. So after uninstalling and deleting all related files I reinstalled node/npm and it is now working.
After all the checks its clear you need to uninstall and re-install node:
sudo npm cache clean -f
sudo npm install -g n
sudo n stable // for stable version
sudo n 0.12.7 // for specific version like v0.12.7
// check the node version after install
node -v
If you are on windows make sure after you Uninstall node you %appdata% or C:\Users\admin\AppData\Roaming and delete all the npm folders that have been created here by your previous install.
git clone https://github.com/nodejs/readable-stream into global node_modules folder