C:\Users\praja>npm --version
Error: Cannot find module './typos.json'
Require stack:
C:\Users\praja\AppData\Roaming\npm\node_modules\npm\node_modules\normalize-package-data\lib\fixer.js
C:\Users\praja\AppData\Roaming\npm\node_modules\npm\node_modules\normalize-package-data\lib\normalize.js
C:\Users\praja\AppData\Roaming\npm\node_modules\npm\node_modules\read-package-json\lib\read-json.js
C:\Users\praja\AppData\Roaming\npm\node_modules\npm\node_modules\pacote\lib\fetcher.js
C:\Users\praja\AppData\Roaming\npm\node_modules\npm\node_modules\pacote\lib\index.js
C:\Users\praja\AppData\Roaming\npm\node_modules\npm\lib\utils\update-notifier.js
C:\Users\praja\AppData\Roaming\npm\node_modules\npm\lib\npm.js
C:\Users\praja\AppData\Roaming\npm\node_modules\npm\lib\cli.js
C:\Users\praja\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
at Function.Module._load (node:internal/modules/cjs/loader:804:27)
at Module.require (node:internal/modules/cjs/loader:1028:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (C:\Users\praja\AppData\Roaming\npm\node_modules\npm\node_modules\normalize-package-data\lib\fixer.js:9:13)
at Module._compile (node:internal/modules/cjs/loader:1126:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
at Module.load (node:internal/modules/cjs/loader:1004:32)
at Function.Module._load (node:internal/modules/cjs/loader:839:12)
at Module.require (node:internal/modules/cjs/loader:1028:19)
Related
I buy a react theme from theme forest and trying to open it I install npm and then I execute the command npm start and I get the error showing bellow. I send a message to developer he reply back and said execute the command npm install react-dev-utils --save
I try this but still getting the same error.
So can anyone help me to resolve this problem.
PS C:\Theme\reactjs\Template> npm start
> Artha#0.1.0 start
> node scripts/start.js
node:internal/modules/cjs/loader:936
throw err;
^
**Error: Cannot find module 'react-dev-utils/WatchMissingNodeModulesPlugin'**
Require stack:
- C:\Theme\reactjs\Template\config\webpack.config.js
- C:\Theme\reactjs\Template\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:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (C:\Theme\reactjs\Template\config\webpack.config.js:16:39)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Theme\\reactjs\\Template\\config\\webpack.config.js',
'C:\\Theme\\reactjs\\Template\\scripts\\start.js'
]
}
Sometime I am getting this error
PS C:\Theme\reactjs\Template> npm start
> Artha#0.1.0 start
> node scripts/start.js
node:internal/modules/cjs/loader:936
throw err;
^
**Error: Cannot find module 'react-dev-utils/typescriptFormatter'**
Require stack:
- C:\Theme\reactjs\Template\config\webpack.config.js
- C:\Theme\reactjs\Template\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:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (C:\Theme\reactjs\Template\config\webpack.config.js:23:29)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Theme\\reactjs\\Template\\config\\webpack.config.js',
'C:\\Theme\\reactjs\\Template\\scripts\\start.js'
]
}
The error is :
^
Error: Cannot find module 'discord.js'
Require stack:
- /app/bot.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:610:15)
at Function.Module._load (internal/modules/cjs/loader.js:526:27)
at Module.require (internal/modules/cjs/loader.js:666:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object.<anonymous> (/app/bot.js:1:17)
at Module._compile (internal/modules/cjs/loader.js:759:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
at Module.load (internal/modules/cjs/loader.js:628:32)
at Function.Module._load (internal/modules/cjs/loader.js:555:12)
at Function.Module.runMain (internal/modules/cjs/loader.js:826:10)
internal/modules/cjs/loader.js:613
throw err;
^
Error: Cannot find module 'discord.js'
Require stack:
- /app/bot.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:610:15)
at Function.Module._load (internal/modules/cjs/loader.js:526:27)
at Module.require (internal/modules/cjs/loader.js:666:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object.<anonymous> (/app/bot.js:1:17)
at Module._compile (internal/modules/cjs/loader.js:759:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
at Module.load (internal/modules/cjs/loader.js:628:32)
at Function.Module._load (internal/modules/cjs/loader.js:555:12)
at Function.Module.runMain (internal/modules/cjs/loader.js:826:10)
I don't know how to make it find discord.js.
Thank you for answers !
Here are the files contained in the project
What about package? Did you added discord.js
from package.json?
if you don't know I'll try to explain : go to package.json and click to add packages and type discord.js to there. And click the first thing you see. I hope it works!
after installing through npm, was also installing Expo before this error
module.js:472
throw err;
^
Error: Cannot find module 'to-fast-properties'
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 Object.<anonymous> (C:\Users\nbeni\Documents\Modelfy Inc Repo\Modelfy\node_modules\babel-types\lib\index.js:317:25)
at Object.<anonymous> (C:\Users\nbeni\Documents\Modelfy Inc Repo\Modelfy\node_modules\babel-types\lib\index.js:836: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've used node and npm before in one or two projects, but I'm not really proficient with it. I now want to initialize a new project on MacOS by using npm init, but I get this:
$ npm init
module.js:540
throw err;
^
Error: Cannot find module 'process-nextick-args'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_readable.js:26:23)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
Any idea what could be wrong here?
[EDIT]
I just tried the suggestion by #kgangadhar , but the result is the same:
$ sudo npm install -g process-nextick-args
module.js:540
throw err;
^
Error: Cannot find module 'process-nextick-args'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_readable.js:26:23)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
I Have installed the below npm module
https://github.com/feross/simple-peer
by,
#sudo npm install simple-peer -g
But When tried including the module, it is unable to find the module. I received the below error
module.js:340
throw err;
^
Error: Cannot find module 'simple-peer'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/home/cst/poc/test.js:1:73)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
In my sample code I just had
var pee = require('simple-peer');