javascript - 微信工作流 yo创建的项目 npm install node prebuild报错
问题描述
Error: Command failed: node-gyp rebuildgyp ERR! clean errorgyp ERR! stack Error: EPERM: operation not permitted, unlink ’E:phpStudyWWWlocalesnode_modules_node-lwip@0.1.3@node-lwipbuildReleaselwip_decoder.node’gyp ERR! stack at Error (native)gyp ERR! System Windows_NT 10.0.14393gyp ERR! command 'C:Program Filesnodejsnode.exe' 'C:UsersAdministratorAppDataRoamingnpmnode_modulescnpmnode_modulesnpminstallnode-gyp-binnode-gyp.js' 'rebuild'gyp ERR! cwd E:phpStudyWWWlocalesnode_modules_node-lwip@0.1.3@node-lwipgyp ERR! node -v v6.10.3gyp ERR! node-gyp -v v3.6.1gyp ERR! not okat ChildProcess.exithandler (child_process.js:204:12)at emitTwo (events.js:106:13)at ChildProcess.emit (events.js:191:7)at maybeClose (internal/child_process.js:886:16)at Socket.<anonymous> (internal/child_process.js:342:11)at emitOne (events.js:96:13)at Socket.emit (events.js:188:7)at Pipe._handle.close [as _onclose] (net.js:497:12)× Install fail! Error: post install error, please remove node_modules before retry!Run 'C:Windowssystem32cmd.exe /d /s /c node prebuild' error, exit code 1Error: post install error, please remove node_modules before retry!Run 'C:Windowssystem32cmd.exe /d /s /c node prebuild' error, exit code 1at ChildProcess.proc.on.code (C:UsersAdministratorAppDataRoamingnpmnode_modulescnpmnode_modulesrunscriptindex.js:65:21)at emitTwo (events.js:106:13)at ChildProcess.emit (events.js:191:7)at maybeClose (internal/child_process.js:886:16)at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
编译失败 根据提示模块全删 重新用cnpm安装还是同样的错误~
找了一些资料 也有一些方法都不能解决问题 求帮助~
问题解答
回答1:试试用yarn来install吧,之前做laravel的项目,依赖vue.js。也是类似问题,npm确实太慢,cnpm貌似会缺少很多东西,最后还是yarn搞定的。yarn兼容npm的命令的,速度比cnpm稍慢,但是比npm快多了。参考
相关文章:
1. python如何不改动文件的情况下修改文件的 修改日期2. angular.js - 不适用其他构建工具,怎么搭建angular1项目3. angular.js - Angular路由和express路由的组合使用问题4. python - django 里自定义的 login 方法,如何使用 login_required()5. java8中,逻辑与 & 符号用在接口类上代表什么意思6. mysql优化 - mysql count(id)查询速度如何优化?7. mysql主从 - 请教下mysql 主动-被动模式的双主配置 和 主从配置在应用上有什么区别?8. 主从备份 - 跪求mysql 高可用主从方案9. node.js - node_moduls太多了10. python - 关于ACK标志位的TCP端口扫描的疑惑?
