Error: Cannot find module 'This is the Folder path \bin\webpack.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47* {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: `webpack serve --config ./bundler/webpack.dev.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\21697\AppData\Roaming\npm-cache\_logs\2021-09-20T20_54_58_070Z-debug.log
PS C:This is the Folder path>
PS: I did delete both the package-lock & node_modules and reinstalled npm using npm install
but the problem still exists, I also tried reinstalling node js, same thing
CodePudding user response:
Error: Cannot find module 'This is the Folder path \bin\webpack.js'
It's looking for a module with name/path 'This is the Folder path \bin\webpack.js'
. That doesn't look like a valid module name/path.
Looks like you added some debug text somewhere you shouldn't have.
Hard to come up with other explanations since you did not post any of the code.
CodePudding user response:
I finally solved it by reinstalling both node js & npm and instlalling chokidar 3 using the command npm i [email protected]
it turns out that the previous version does not support node js 14