启动我的应用程序时,我遇到了这个错误。我已经检查并确认所需的模块已经安装好,并且已经给予了全局访问权限。
Hussains-MacBook-Pro:NodeRest-Shop Hussain$ npm start
> noderest-shop@1.0.0 start /Users/Hussain/Desktop/Development/Web/NodeRest-Shop
> nodemon server.js
module.js:549
throw err;
^
Error: Cannot find module 'binary-extensions'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/Hussain/Desktop/Development/Web/NodeRest-Shop/node_modules/is-binary-path/inde
x.js:3:24)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! noderest-shop@1.0.0 start: `nodemon server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the noderest-shop@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Hussain/.npm/_logs/2018-06-25T05_23_59_594Z-debug.log
npm install binary-extensions --save
命令安装以下软件包。 - Bhargav Chudasama