我正在尝试运行构建一个小型的 Express API。问题是我在尝试启动和运行服务器时遇到问题。当我输入 npm start 时,出现以下错误。
> nodemon ./index.js --exec babel-node -e js
module.js:557
throw err;
^
Error: Cannot find module '../lib/cli'
我在 package.json 中编写的脚本如下。
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start":"nodemon ./index.js --exec babel-node -e js"
},
如有任何帮助,我们将不胜感激。
最佳答案
我需要重新安装node_modules。
cd your_project_folder
rm -rf node_modules
npm install
关于javascript - 运行服务器时出现找不到模块 '../lib/cli' 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49599627/