【问题标题】:REACTION INIT : Node modules were not successfully installedREACTION INIT : 节点模块未成功安装
【发布时间】:2018-08-02 09:58:54
【问题描述】:

我在尝试创建反应项目时遇到权限错误:

➜  myproject sudo npm install npm@latest -g
[sudo] Mot de passe de julien : 
/usr/local/bin/npx -> /usr/local/lib/node_modules/npm/bin/npx-cli.js
/usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
+ npm@6.3.0
added 283 packages, removed 363 packages and updated 41 packages in 12.239s


➜  myproject npm -v
6.3.0


➜  myproject sudo npm install -g reaction-cli
npm WARN deprecated command-exists@1.2.2: Potential security vulnerability fixed in v.1.2.4
/usr/local/bin/reaction -> /usr/local/lib/node_modules/reaction-cli/dist/main.js
/usr/local/bin/rc -> /usr/local/lib/node_modules/reaction-cli/dist/main.js
+ reaction-cli@0.29.0
updated 2 packages in 17.817s

➜  myproject sudo reaction init

Cloning the master branch of Reaction from Github...

Clonage dans 'reaction'...
remote: Counting objects: 131122, done.
remote: Compressing objects: 100% (50/50), done.
remote: Total 131122 (delta 18), reused 40 (delta 12), pack-reused 131059
Réception d'objets: 100% (131122/131122), 48.39 MiB | 421.00 KiB/s, fait.
Résolution des deltas: 100% (74545/74545), fait.

Installing NPM packages...

npm ERR! write after end

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/julien/.npm/_logs/2018-08-02T09_05_18_750Z-debug.log

Error: Node modules were not successfully installed. Exiting.

请注意,我几天前在 USB 硬盘上安装了 Ubuntu。我昨天安装了 nvm (npm-v = 6.3.0)。

我想这是一个权限问题,但我是 Linux 操作系统的新手,您有什么建议吗?

【问题讨论】:

    标签: node.js npm permissions node-modules sudo


    【解决方案1】:

    我使用 npm i -g npm@5.6.0 来降级 npm 版本(显然其他版本无法提取大型项目)。 更多信息npm github

    【讨论】:

      猜你喜欢
      • 2021-05-23
      • 2022-01-03
      • 2023-04-01
      • 2014-06-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多