javascript - 节点 Js 错误 Module.js 549
问题描述
在启动我的应用程序时,我收到此错误。我已经检查并看到所需的模块已安装好,并且还为其提供了全局访问权限。
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 i npm@latest -g
推荐阅读
- javascript - 如何使用“xml2js”库在 xml 1.0 中转义“SOH”字符?
- python - 返回另一个数组中数字的提取索引
- python - 如何替换列表中的特定值?
- javascript - Formik 在有效字段更改后调度 Redux 操作
- deep-learning - 我可以在进行深度学习时使用来自不同来源的数据集吗
- php - 未捕获的 PHP 异常 Symfony\Component\HttpKernel\Exception\NotFoundHttpException:“没有为“GET /”找到路由
- c++ - 带有 std::tuple_cat 的模板实例化 decltype 和 declval
- javascript - 使用来自 JSON 对象的数据填充具有多条线的 Chart.Js 折线图
- javascript - 使用 Typescript 在 Webpack 编译期间动态导入模块
- r - 计算 R 中具有特定名称模式的列的行均值