Javascript 来自“的几个包”;节点“U模块”;他们失踪了。怎么用?为什么?哪里
作为调试过程的一部分,在尝试解决另一个问题时,我偶然发现以下问题:Javascript 来自“的几个包”;节点“U模块”;他们失踪了。怎么用?为什么?哪里,javascript,node.js,debugging,node-modules,Javascript,Node.js,Debugging,Node Modules,作为调试过程的一部分,在尝试解决另一个问题时,我偶然发现以下问题: [Busy] Launching SocketCluster 1538304734910 - Origin: Worker (PID 43804) [Error] Error: Compilation of µWebSockets has failed and there is no pre-compiled binary available for your system. Please install a suppor
[Busy] Launching SocketCluster
1538304734910 - Origin: Worker (PID 43804)
[Error] Error: Compilation of µWebSockets has failed and there is no pre-compiled binary available for your system. Please install a supported C++11 compiler and reinstall the module 'uws'.
at native (/Users/antonmladenov/Documents/Coding Fitness/GraphQL/client/node_modules/uws/uws.js:38:19)
at Object.<anonymous> (/Users/antonmladenov/Documents/Coding Fitness/GraphQL/client/node_modules/uws/uws.js:42:3)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at new SCServer (/Users/antonmladenov/Documents/Coding Fitness/GraphQL/client/node_modules/socketcluster-server/scserver.js:96:18)
[Busy]启动SocketCluster
1538304734910-来源:工人(PID 43804)
[错误]错误:µWebSocket的编译失败,并且您的系统没有可用的预编译二进制文件。请安装受支持的C++11编译器并重新安装模块“uws”。
本机(/Users/antonmladenov/Documents/Coding Fitness/GraphQL/client/node_modules/uws/uws.js:38:19)
反对。(/Users/antonmladenov/Documents/Coding Fitness/GraphQL/client/node_modules/uws/uws.js:42:3)
at模块编译(内部/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js(internal/modules/cjs/loader.js:700:10)
在Module.load(内部/modules/cjs/loader.js:599:32)
在tryModuleLoad(内部/modules/cjs/loader.js:538:12)
at Function.Module._load(内部/modules/cjs/loader.js:530:3)
at Module.require(内部/modules/cjs/loader.js:637:17)
根据需要(内部/modules/cjs/helpers.js:20:18)
在新的SCServer上(/Users/antonmladenov/Documents/Coding Fitness/GraphQL/client/node_modules/socketcluster server/SCServer.js:96:18)
我的重点特别放在两个包上-
:(uws
)李>/node_modules/uws/uws.js:38:19
:(socketcluster服务器
)/node\u modules/socketcluster服务器/scserver.js:96:18
node\u模块的整个包树
,包根本不在那里
我的问题是:
这些依赖项在
package.json
中吗?您是否运行了npm安装
,以便获得所有依赖项?请注意,如果另一个开发人员添加了使用它们的代码,或者即使是您在另一台机器上,它们也可能是全局安装的,这意味着项目将单独在该机器上运行。因此,在添加包时,为什么需要将它们添加到package.json
而不是runnintnpm install--global
。否,@vlaz。它们不是包.json的一部分,它们是包中模块的依赖项。嗯,我做了纱线
和纱线升级
和纱线什么的
,但还没有成功。