module.js:549
21:34:00.277 throw err;
21:34:00.279 ^
21:34:00.279 Error: Cannot find module 'node-ipc'
21:34:00.284 at Function.Module._resolveFilename (module.js:547:15)
21:34:00.285 at Function.Module._load (module.js:474:25)
21:34:00.290 at Module.require (module.js:596:17)
21:34:00.290 at require (internal/module.js:11:18)
21:34:00.293 at Object.<anonymous> (D:\HBuilderX\plugins\uniapp-cli\node_modules\@vue\cli-shared-utils\lib\ipc.js:1:75)
21:34:00.294 at Module._compile (module.js:652:30)
21:34:00.302 at Object.Module._extensions..js (module.js:663:10)
21:34:00.302 at Module.load (module.js:565:32)
21:34:00.305 at tryModuleLoad (module.js:505:12)
21:34:00.308 at Function.Module._load (module.js:497:3)
- 发布:2019-10-30 21:39
- 更新:2020-05-26 09:41
- 阅读:17761
hiDrew - No Comment
这个问题是因为HBX插件包中依赖的包丢失了,而且有可能丢失不止一个包。解决方法:
一. 根据错误提示路径通过Node下载这个包
- 例如安装路径为:D:\HBuilderX
则找到:D:\HBuilderX\plugins\uniapp-cli\node_modules\ - 使用Node安装出错提示模块node-ipc,一定要在【node_modules】目录下
- 或者下载node-ipc包,解压到【node_modules】目录下
二.利用其它版本的HBX插件包来弥补自己正在使用HBX
1.下载一个新的HBX,稳定版和开发版都行,同上,找到相关路径:\plugins\uniapp-cli\node_modules\
2.根据错误提示在新的HBX插件包中找到该模块,拷贝到当前自己使用的HBX对应路径中
3.再编译,再操作
三.终极大招
不用回退HBX的旧版本,直接下载HBX Alpha版,安装最新版并安装各种需要的插件,之后编译后即可,不会存在上述问题了。
请问下 我导入插件 报这个错误是咋回事呢
Error: Module build failed (from ./node_modules/less-loader/dist/cjs.js):
17:54:51.130 Error: Cannot find module 'D:\Program Files\HBuilderX\plugins\compile-less\node_modules\less'
17:54:51.151 at Function.Module._resolveFilename (module.js:547:15)
17:54:51.172 at Function.Module._resolveFilename (D:\Program Files\HBuilderX\plugins\uniapp-cli\node_modules\module-alias\index.js:49:29)
17:54:51.193 at Function.Module._load (module.js:474:25)
17:54:51.213 at Module.require (module.js:596:17)
17:54:51.233 at require (internal/module.js:11:18)
17:54:51.274 at Module._compile (module.js:652:30)
17:54:51.294 at Object.Module._extensions..js (module.js:663:10)
17:54:51.315 at Module.load (module.js:565:32)
17:54:51.335 at tryModuleLoad (module.js:505:12)
17:54:51.355 at Function.Module._load (module.js:497:3)
17:54:51.375 at Module.require (module.js:596:17)
17:54:51.396 at require (internal/module.js:11:18)
17:54:51.437 at Module._compile (module.js:652:30)
17:54:51.457 at Object.Module._extensions..js (module.js:663:10)
17:54:51.478 at Module.load (module.js:565:32)
17:54:51.498 at tryModuleLoad (module.js:505:12)
17:54:51.519 at Function.Module._load (module.js:497:3)
17:54:51.540 at Module.require (module.js:596:17)
17:54:51.560 at require (internal/module.js:11:18)
17:54:51.581 at loadLoader (D:\Program Files\HBuilderX\plu
1***@qq.com
我也卸载重装插件解决了
2020-03-31 20:48
xyzzzz
回复 1***@qq.com: 有用
2020-04-24 13:12
5***@qq.com
亲测有用!!!
2020-05-13 16:25