[0]全局安装layaair2-cmd报错怎么办啊

npm WARN deprecated core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path /usr/local/lib/node_modules/layaair2-cmd/node_modules/mozjpeg
npm ERR! command failed
npm ERR! command sh -c node lib/install.js
npm ERR! fs.js:47
npm ERR! } = primordials;
npm ERR!     ^
npm ERR! 
npm ERR! ReferenceError: primordials is not defined
npm ERR!     at fs.js:47:5
npm ERR!     at req_ (/usr/local/lib/node_modules/layaair2-cmd/node_modules/natives/index.js:143:24)
npm ERR!     at Object.req [as require] (/usr/local/lib/node_modules/layaair2-cmd/node_modules/natives/index.js:55:10)
npm ERR!     at Object.<anonymous> (/usr/local/lib/node_modules/layaair2-cmd/node_modules/graceful-fs/fs.js:1:37)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1101:14)
npm ERR!     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR!     at Module.require (node:internal/modules/cjs/loader:1005:19)
npm ERR!     at require (node:internal/modules/cjs/helpers:102:18)
 
请问有人能解答不
企业微信截图_e037846c-38f8-4dbd-bf3d-8495132feab5.png
已邀请:

Laya_z

赞同来自:

node版本是多少,应该是node版本过高导致的,降一下node版到10试试

要回复问题请先

商务合作
商务合作