node.js - 在 Ubuntu 16.04 上安装 npm 的问题
问题描述
我正在尝试使用以下命令安装 babel:
npm install --save-dev babel-cli
这是抛出以下输出。
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.3
npm WARN react-essential@1.0.0 No repository field.
npm ERR! Linux 4.4.0-122-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--save-dev" "babel-cli"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! path ../babel-cli/bin/babel-doctor.js
npm ERR! code EPROTO
npm ERR! errno -71
npm ERR! syscall symlink
npm ERR! EPROTO: protocol error, symlink '../babel-cli/bin/babel-doctor.js' -> '/code/ReactExampleFiles/Ch02/02_01/start/node_modules/.bin/babel-doctor'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Linux 4.4.0-122-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--save-dev" "babel-cli"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! path npm-debug.log.1893237937
npm ERR! code ETXTBSY
npm ERR! errno -26
npm ERR! syscall rename
npm ERR! ETXTBSY: text file is busy, rename 'npm-debug.log.1893237937' -> 'npm-debug.log'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /code/ReactExampleFiles/Ch02/02_01/start/npm-debug.log
在一些研究中 - 建议尝试npm install --no-bin-links
,但仍然出错:
vagrant@ubuntu-xenial:/code/ReactExampleFiles/Ch02/02_01/start$ npm install --no-bin-links
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.3
npm WARN react-essential@1.0.0 No repository field.
请建议如何解决。
解决方案
尝试更新版本的 npm。npm install npm -g 或 apt update npm。
推荐阅读
- r - 在 R 中设置因子的参考水平,但保留图形/图表的原始顺序
- anylogic - 按天填写服务块,即连续填写 5 天
- javascript - 如何在节点 js 中发送 html 电子邮件模板?
- codenameone - 按钮不显示代号
- sorting - 哈斯克尔。如何为合并排序中的每个排序元素打印数组
- flutter - 弹出页面时如何在Textfield中保留文本?
- python - ValueError: SymbolicConstant name ' ' 只能包含大写、数字或下划线
- google-apps-script - 无法忽略谷歌表格中的公式列
- c++ - 这是使用 C++ 模板元编程的有效方法吗?
- r - 在 magick_image_readpath 中出现致命错误后,R 会话中止