I got this problem for a while can't find any solution , please give me some explain.
C:\Users\ASUS ZenBook I5>npm -v
evalmachine.<anonymous>:27
const { Math, Object } = primordials;
^
ReferenceError: primordials is not defined
at evalmachine.<anonymous>:27:26
at Object.<anonymous> (C:\Users\ASUS ZenBook I5\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\fs.js:11:8)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (C:\Users\ASUS ZenBook I5\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:3:27)
at Module._compile (internal/modules/cjs/loader.js:959:30)
node.js
v12.13.1
Possible duplicate: npm ReferenceError: primordials is not defined (node.js)
The problem seems to be graceful-fs - maybe it's even enough to run the following?
npm cache clean --force
Uninstall node go to \AppData\Roaming\npm\node_modules\npm delete this npm folder, now install node nad that is all.
Related
I have React.js application with the connection of Rust. Problem is about running the application. When I try to run npm start it return this error:
throw err;
^
Error: Cannot find module 'react-dev-utils/WatchMissingNodeModulesPlugin'
Require stack:
- /Users/elchinfarhad/Desktop/IndoorNavigation/react-client/config/webpack.config.js
- /Users/elchinfarhad/Desktop/IndoorNavigation/react-client/scripts/start.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/Users/elchinfarhad/Desktop/IndoorNavigation/react-client/config/webpack.config.js:19:39)
at Module._compile (node:internal/modules/cjs/loader:1099:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:999:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/elchinfarhad/Desktop/IndoorNavigation/react-client/config/webpack.config.js',
'/Users/elchinfarhad/Desktop/IndoorNavigation/react-client/scripts/start.js'
]
}
Point is it was working before and I did not change anything, but later when I try npm start it return the above error. I try to delete node_modules and package-lock.json and install again but nothing changes. Can someone please help how can I solve this problem.
I encountered the same problem. It is probably about your npm version. I downgraded my npm version to 6.14.11, and the problem was solved.
npm install -g npm#6.14.11
After npm install -g #vue/cli#3.0.0-beta.9 ,
I run the command vue create client
I get the following output:
module.js:557
throw err;
^
Error: Cannot find module 'cmd-shim'
at Function.Module._resolveFilename (module.js:555:15)
at Function.Module._load (module.js:482:25)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at Object.<anonymous>
(/Users/atalante/.nvm/versions/node/v9.4.0/lib/node_modules/#vue/cli/lib/util/linkBin.js:10:27)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
i tried rm -rf node_modules and npm install
but it doesn't work.
This usually occurs when there is an issue with either your node or npm installations, Try updating node.js and npm to resolve the issue which has worked for me in the past. This might help in updating npm : Update NPM
My npm command does not work anymore I uninstall and re install nodejs many times and still getting the same issue, so here is my console output, how can I fix this?
C:\Users\pirat>npm install
module.js:529
throw err;
^
Error: Cannot find module 'internal/errors'
at Function.Module._resolveFilename (module.js:527:15)
at Function.Module._load (module.js:476:23)
at Module.require (module.js:568:17)
at require (internal/module.js:11:18)
at evalmachine.<anonymous>:36:16
at Object.<anonymous> (C:\Users\pirat\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\fs.js:11:1)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
C:\Users\pirat>
I re-install node version 6.11 and updated npm now is all working :)
{"level":"error","message":"uncaughtException SyntaxError: Use of
const in strict mode.\n at Module._compile (module.js:439:25)\n
at Object.Module._extensions..js (module.js:474:10)\n at
Module.load (module.js:356:32)\n at Function.Module._load
(module.js:312:12)\n at Module.require (module.js:364:17)\n at
require (module.js:380:17)\n at Object.
(/var/www/myproject/dist/node_modules/sparkpost/node_modules/request/node_modules/hawk/lib/index.js:5:33)\n
at Module._compile (module.js:456:26)\n at
Object.Module._extensions..js (module.js:474:10)\n at Module.load
(module.js:356:32)\n at Function.Module._load (module.js:312:12)\n
at Module.require (module.js:364:17)\n at require
(module.js:380:17)\n at Object.
(/var/www/myproject/dist/node_modules/sparkpost/node_modules/request/request.js:9:12)\n
at Module._compile (module.js:456:26)\n at
Object.Module._extensions..js
(module.js:474:10)","timestamp":"2017-09-25T02:45:43.418Z"}
I've found that problem when I run my node backend project. I didn't upgrade anything in these days and encounter that error accidentally.
My node version is node -v v0.10.37 npm -v 1.4.28 Please help me how to solve that issue. Thanks.
I updated node to 7.9.0 with homebrew. Now whenever I do anything with npm I get the following error:
$ node -v
v7.9.0
$ npm -v
module.js:472
throw err;
^
Error: Cannot find module '../lib/utils/unsupported.js'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
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:79:3)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
I have tried uninstalling and reinstalling node with no change.
What can I try to recover from this?
try to remove /usr/local/lib/node_modules/npm and reinstall node again, this should work.