【发布时间】:2020-01-06 07:50:13
【问题描述】:
我目前正在构建一个 RESTful API。我使用命令mongod 启动我的MongoDB 服务器。但是,当我重新启动 Node 服务器(使用 rs)时,它会引发以下错误:
[nodemon] starting `node todoListApi`
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module 'C:\Users\Zakaria5\Desktop\Stage Technique
2019\zen-networks-backend\todoListApi'
at Function.Module._resolveFilename
(internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
[nodemon] app crashed - waiting for file changes before starting...
我用谷歌搜索了这个错误,解决方案似乎是删除node_modules 目录。但是,当我输入rm -rf nodes_modules 时,它显示找不到该命令。我也尝试使用npm install 和npm start,但这也会引发错误。我做错了什么?
【问题讨论】:
-
你的问题是什么?
-
您是要删除
node_modules,还是nodes_modules? -
@IronFlare 徒劳
标签: node.js visual-studio-code node-modules