gpt4 book ai didi

javascript - Node Js 错误 Module.js 549

转载 作者:行者123 更新时间:2023-11-30 06:50:45 24 4
gpt4 key购买 nike

启动我的应用程序时,出现此错误。我已经检查并看到所需的模块已正确安装,并且还为其提供了全局访问权限。

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

最佳答案

如日志中所示,您缺少 binary-extensions 模块:

Error: Cannot find module 'binary-extensions'

可能是您缺少某些依赖项或忘记包含它。

您可以使用 安装它:

 npm install binary-extensions

include binaryExtensions在你的项目中:

const binaryExtensions = require('binary-extensions');

关于javascript - Node Js 错误 Module.js 549,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51016794/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com