解决 "Npm Err! Cannot Read Property 'Length' of Undefined"

解决 "Npm Err! Cannot Read Property 'Length' of Undefined"

解决 Termux出现npm err! cannot read property ‘length’ of undefined 问题

方法

  • 复制以下内容
1
(require('os').cpus() || { length: 1 }).length
  • 编辑
1
vim ../usr/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js
  • 修改如下保存即可

修改.jpg

已知问题

  • Npm 无法升级。

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×