我正在设置节点js服务器,运行此命令npm run dev
时出现此错误:
Error: Cannot find module './utils'
Require stack:
- /home/guesswl/www/node_modules/braces/lib/stringify.js
- /home/guesswl/www/node_modules/braces/index.js
- /home/guesswl/www/node_modules/chokidar/index.js
- /home/guesswl/www/node_modules/nodemon/lib/monitor/watch.js
- /home/guesswl/www/node_modules/nodemon/lib/monitor/run.js
- /home/guesswl/www/node_modules/nodemon/lib/monitor/index.js
- /home/guesswl/www/node_modules/nodemon/lib/nodemon.js
- /home/guesswl/www/node_modules/nodemon/lib/index.js
- /home/guesswl/www/node_modules/nodemon/bin/nodemon.js
如何解决此错误?
答案 0 :(得分:1)
尝试删除> node_modules> npm install 或节点版本有问题。