MODULE_NOT_FOUND', #43120
Replies: 9 comments 1 reply
-
Are you sure that the file '/Users/username/Desktop/SOFTWARE-DEVELOPMENT/MD/WEBSITE/MB-FOLDER/app.js' is really exists? |
Beta Was this translation helpful? Give feedback.
-
I'd say, in the terminal, you are not in the parent directory of your app.js. Have a look at that and run the terminal in the same directory as app.js first and then try to run again. |
Beta Was this translation helpful? Give feedback.
-
You can resolve this problem by adding nodemon to your package.json: npm install nodemon --save-dev Added --save-dev since it's required during development only. |
Beta Was this translation helpful? Give feedback.
-
--save-dev is used to save the package for development purposes, you can try |
Beta Was this translation helpful? Give feedback.
-
Actually have the same issue. Any help would be appreciated.... added a folder and a file inside to the same path that had app.js ... but it doesn't recognize the path node:internal/modules/cjs/loader:936 Error: Cannot find module '../middleware/auth'
|
Beta Was this translation helpful? Give feedback.
-
D:\authMern\server>nodemon index.js Error: Cannot find module './routes/users'
What should I do? |
Beta Was this translation helpful? Give feedback.
-
This issue happens when you point Node to a file that does not exist. I'm going to go ahead and close this as there isn't much actionable here. |
Beta Was this translation helpful? Give feedback.
-
[nodemon] to restart at any time, enter |
Beta Was this translation helpful? Give feedback.
-
Version
v16.15.0
Platform
Darwin MacBook-Pro-3.lan 21.4.0 Darwin Kernel Version 21.4.0: Mon Feb 21 20:34:37 PST 2022; root:xnu-8020.101.4~2/RELEASE_X86_64 x86_64
Subsystem
module not found
What steps will reproduce the bug?
I run nodemon app.js which is throwing an error.
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
I'm trying to run nodemon locally, I have deleted node and reinstalled it but it showing same error.
What do you see instead?
m@MacBook-Pro-3 MB-FOLDER % nodemon app.js [nodemon] 2.0.15 [nodemon] to restart at any time, enter `rs` [nodemon] watching path(s): *.* [nodemon] watching extensions: js,mjs,json [nodemon] starting `node app.js app.js` node:internal/modules/cjs/loader:936 throw err; ^ Error: Cannot find module '/Users/username/Desktop/SOFTWARE-DEVELOPMENT/MD/WEBSITE/MB-FOLDER/app.js' at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) at Function.Module._load (node:internal/modules/cjs/loader:778:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) at node:internal/main/run_main_module:17:47 { code: 'MODULE_NOT_FOUND', requireStack: [] } [nodemon] app crashed - waiting for file changes before starting... ^Cnode:internal/modules/cjs/loader:936 throw err;
Additional information
I would appreciate any help that will resolve this , I have tried all the possible solution, but it did not work.
Beta Was this translation helpful? Give feedback.
All reactions