module.js:549 throw err;
Node.js Version - node-v8.11.1-x64 Windows 10
Installed Nodejs above version and I get these errors when tried to check the npm version through command prompt.
C:\Users\shant>node -v v8.11.1
C:\Users\shant>npm -v module.js:549 throw err; ^
Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\node_modules\npm\bin\npm-cli.js' at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Function.Module.runMain (module.js:693:10) at startup (bootstrap_node.js:188:16) at bootstrap_node.js:609:3 module.js:549 throw err; ^
Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\node_modules\npm\bin\npm-cli.js' at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Function.Module.runMain (module.js:693:10) at startup (bootstrap_node.js:188:16) at bootstrap_node.js:609:3
Similar issues: https://github.com/nodejs/help/issues/1019 and https://github.com/nodejs/help/issues/663
Hi, that doesn't answer my issue. please help.
looks like this is a recurring issue. Let us attack this to the bottom. @ShanthanVoruganti , can you provide the steps that led to this error, including previous installation history - as backwards as you can remember, in sequence? I will attempt a local recreate and dig into it.
@gireeshpunathil hi, below are the details,
Installed nodejs ( node-v8.11.1-x64 ) Restarted my system In command prompt, executed below
C:\Users\shant>node -v v8.11.1
C:\Users\shant>npm -v module.js:549 throw err; ^
Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\node_modules\npm\bin\npm-cli.js' at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Function.Module.runMain (module.js:693:10) at startup (bootstrap_node.js:188:16) at bootstrap_node.js:609:3 module.js:549 throw err; ^
Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\node_modules\npm\bin\npm-cli.js' at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Function.Module.runMain (module.js:693:10) at startup (bootstrap_node.js:188:16) at bootstrap_node.js:609:3
did you have earlier installations of node.js? or is this the first installation?
where did you download node.js from? how did you install it?
what is the PATH environment variable looking like? what is the output of set PATH ?
hello, I delete AppData/Roaming/npm and AppData/Roaming/npm-cache directories. laucnh a new console and it is ok
regards
Inactive, closing.
For posterity:
There are 2 variants of this type of errors, one has to do with the white space in the Program Files that the shell does not expand properly.
The second one is this scenario:
Error: Cannot find module: C:\Program Files\nodejs\node_modules\npm\bin\node_modules\npm\bin\npm-cli.js
The error is true, as such a location does not exist.
there is a $dp0 shell variable in the npm.cmd script. In this case, the script should be present (and executed from) C:\Program Files\nodejs
the script is present there, and at C:\Program Files\nodejs\node_modules\npm\bin too.
being present in 2 locations is not a problem, executing the second script brings the issue.
$dp0 expands to current directory, and the expression in the script becomes:
C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js if executed from node's bin
C:\Program Files\nodejs\node_modules\npm\bin\node_modules\npm\bin\npm-cli.js fi executed from npm's bin
if npm module is unloaded and if this script is executed, the issue surfaces.
I don't know if it is with npm uninstall, or with short cuts (links) not pointing to the right script.
Workaround would be to
- re-install npm or
- fix the link to point to the first script.
Uninstall node.js and install it again, see this video: https://www.youtube.com/watch?v=5Sg3Igpp6gc It worked for me !
Estou com este problema alguém poderia me ajudar?
C:\WINDOWS\system32>ionic -v module.js:549 throw err; ^
Error: Cannot find module 'tslib'
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 Object.
facing same issue....
module.js:549 throw err; ^
Error: Cannot find module '../models/config'
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 Object.
i resolved below issue
module.js:549 throw err; ^
Error: Cannot find module 'ethereumjs-wallet/hdkey'
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 Object.
===========================================================
npm uninstall ethereumjs-wallet npm uninstall truffle-hdwallet-provider npm install --save [email protected] npm install --save [email protected]
Credit goes to 2 gentlemen on udemy QA Sarshad and Guang
+1
exit the terminal and restarting and it worked
Hello,
am getting same error, I deployed my app to heroku but on trying to run the application, it is not coming up. So i decided to run this on my terminal heroku logs --tail and below is the error am getting. please can anyone help me out. Am new to development and this my project
2018-08-18T17:33:07.759124+00:00 app[web.1]: Error: Cannot find module './routes/company'
2018-08-18T17:33:07.759126+00:00 app[web.1]: at Function.Module._resolveFilename (module.js:547:15)
2018-08-18T17:33:07.759128+00:00 app[web.1]: at Function.Module._load (module.js:474:25)
2018-08-18T17:33:07.759130+00:00 app[web.1]: at Module.require (module.js:596:17)
2018-08-18T17:33:07.759132+00:00 app[web.1]: at require (internal/module.js:11:18)
2018-08-18T17:33:07.759137+00:00 app[web.1]: at Object.Module._extensions..js (module.js:663:10)
2018-08-18T17:33:07.759134+00:00 app[web.1]: at Object.node app.js
2018-08-18T23:05:02.064502+00:00 heroku[web.1]: State changed from starting to crashed
2018-08-18T23:05:01.882659+00:00 app[web.1]: module.js:549
2018-08-18T23:05:01.882680+00:00 app[web.1]: throw err;
2018-08-18T23:05:01.882682+00:00 app[web.1]: ^
2018-08-18T23:05:01.882683+00:00 app[web.1]:
2018-08-18T23:05:01.882687+00:00 app[web.1]: at Function.Module._resolveFilename (module.js:547:15)
2018-08-18T23:05:01.882685+00:00 app[web.1]: Error: Cannot find module './routes/company'
2018-08-18T23:05:01.882689+00:00 app[web.1]: at Function.Module._load (module.js:474:25)
2018-08-18T23:05:01.882690+00:00 app[web.1]: at Module.require (module.js:596:17)
2018-08-18T23:05:01.882692+00:00 app[web.1]: at require (internal/module.js:11:18)
2018-08-18T23:05:01.882693+00:00 app[web.1]: at Object.node app.js
2018-08-19T01:24:00.864571+00:00 app[web.1]: /app/app.js:11
2018-08-19T01:24:00.864592+00:00 app[web.1]: app.set('port', (process.env.PORT || 5000));
2018-08-19T01:24:00.864593+00:00 app[web.1]: ^
2018-08-19T01:24:00.864595+00:00 app[web.1]: ReferenceError: app is not defined
2018-08-19T01:24:00.864594+00:00 app[web.1]:
2018-08-19T01:24:00.864596+00:00 app[web.1]: at Object.node app.js
2018-08-19T01:24:09.846016+00:00 heroku[web.1]: Process exited with status 1
2018-08-19T01:24:09.780460+00:00 app[web.1]: /app/app.js:11
2018-08-19T01:24:09.780487+00:00 app[web.1]: app.set('port', (process.env.PORT || 5000));
2018-08-19T01:24:09.780488+00:00 app[web.1]: ^
2018-08-19T01:24:09.780490+00:00 app[web.1]:
2018-08-19T01:24:09.780491+00:00 app[web.1]: ReferenceError: app is not defined
2018-08-19T01:24:09.780493+00:00 app[web.1]: at Object.node app.js
2018-08-19T01:34:29.952014+00:00 heroku[web.1]: Process exited with status 1
2018-08-19T01:34:30.068035+00:00 heroku[web.1]: State changed from starting to crashed
2018-08-19T01:34:29.839754+00:00 app[web.1]: /app/app.js:11
2018-08-19T01:34:29.839774+00:00 app[web.1]: app.set('port', (process.env.PORT || 5000));
2018-08-19T01:34:29.839775+00:00 app[web.1]: ^
2018-08-19T01:34:29.839777+00:00 app[web.1]:
2018-08-19T01:34:29.839778+00:00 app[web.1]: ReferenceError: app is not defined
2018-08-19T01:34:29.839780+00:00 app[web.1]: at Object.
I have the same problem. but I got some help and solved it successfully.
- delete the entire
node_modules - run
npm cache clean, if errors occurred, usenpm cache clean --force - run
npm install
it works for me.
@kervoaz your method worked for me too. Thank you!
@kervoaz your method worked for me too. Thank you!
where is AppData directory in linux?
@SatyamGaba I'm running Windows, so I'm not entirely sure what the equivalent on a Linux will be.
@kervoaz your method worked for me too. Thank you!
where is AppData directory in linux?
@SatyamGaba I'm running Windows, so I'm not entirely sure what the equivalent on a Linux will be.
@kervoaz your method worked for me too. Thank you!
where is AppData directory in linux?
~/.