热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

npm安装-gangular-cli:1:节点:未找到-npminstall-gangular-clish:1:node:notfound

npminstall-g@angularclitryingtoinstallangular-cliinubuntu16.10andIfacethefollowing
npm install -g @angular/cli

trying to install angular-cli in ubuntu 16.10 and I face the following error on sass.

试图在ubuntu 16.10中安装angular-cli,我在sass上面临以下错误。

/home/user1/.npm-packages/bin/ng -> /home/user1/.npm-packages/lib/node_modules/@angular/cli/bin/ng

> node-sass@4.5.0 install /home/user1/.npm-packages/lib/node_modules/@angular/cli/node_modules/node-sass
> node scripts/install.js

sh: 1: node: not found
/home/user1/.npm-packages/lib
└── (empty)

npm WARN optional Skipping failed optional dependency /@angular/cli/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.17
npm WARN @angular/core@2.4.6 requires a peer of rxjs@^5.0.1 but none was installed.
npm ERR! Linux 4.8.0-22-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "@angular/cli"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn

npm ERR! node-sass@4.5.0 install: `node scripts/install.js`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the node-sass@4.5.0 install script 'node scripts/install.js'.

Note: I'm on a fresh machine, setting up npm/angular for the first time.

注意:我在一台新机器上,第一次设置npm/ angle。

1 个解决方案

#1


12  

Turns out sass still expects node in /usr/bin/

sass仍然期望在/usr/bin/中有节点

Creating a link, by doing the following resolved the issue

创建一个链接,通过执行以下操作解决了问题

sudo ln -s /usr/bin/nodejs /usr/bin/node

推荐阅读
author-avatar
相依相伴一起慢慢变老
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有