微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

无法安装gazebojs在安装过程中出现 NPM 错误

如何解决无法安装gazebojs在安装过程中出现 NPM 错误

我一直在尝试在 Mac 上使用 Gazebo 模拟器。我已经能够安装这里提到的先决条件:Gazebo installation on Mac 我只是无法安装 GazeboJs。当我在终端中使用以下命令时:npm install gazebojs --save,我收到 npm 错误代码 1。我检查了其他具有类似标题页面,并遵循了以下通常的程序:

npm cache clean 
npm install

但是仍然出现相同的错误。 这是错误输出

npm ERR! code 1
npm ERR! path /Users/local/ardupilot_gazebo/build/ardupilot_gazebo/build/gz_node_inst/node_modules/gazebojs
npm ERR! command Failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! fs.js:45
npm ERR! } = primordials;
npm ERR!     ^
npm ERR! 
npm ERR! ReferenceError: primordials is not defined
npm ERR!     at fs.js:45:5
npm ERR!     at req_ (/Users/local/ardupilot_gazebo/build/ardupilot_gazebo/build/gz_node_inst/node_modules/natives/index.js:143:24)
npm ERR!     at Object.req [as require] (/Users/local/ardupilot_gazebo/build/ardupilot_gazebo/build/gz_node_inst/node_modules/natives/index.js:55:10)
npm ERR!     at Object.<anonymous> (/Users/local/ardupilot_gazebo/build/ardupilot_gazebo/build/gz_node_inst/node_modules/node-gyp/node_modules/graceful-fs/fs.js:1:37)
npm ERR!     at Module._compile (internal/modules/cjs/loader.js:1068:30)
npm ERR!     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
npm ERR!     at Module.load (internal/modules/cjs/loader.js:933:32)
npm ERR!     at Function.Module._load (internal/modules/cjs/loader.js:774:14)
npm ERR!     at Module.require (internal/modules/cjs/loader.js:957:19)
npm ERR!     at require (internal/modules/cjs/helpers.js:88:18)

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/local/.npm/_logs/2021-06-15T06_56_17_938Z-debug.log

感谢您的帮助!

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。