【NodeJS】Error: Cannot find module 'ms'
报错原因:
Error: Cannot find module 'ms' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object.<anonymous> (D:\xampp\htdocs\sell\node_modules\_express@4.15.3@express\node_modules\debug\src\debug.js:14:20) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3)
决解方案:
删掉node_modules包,之后在cnpm install ms --save-dev就可以i了。
之后过后面还要重新安装所有的依赖包。