无法安装angular-cli [英] Can't install angular-cli

查看:52
本文介绍了无法安装angular-cli的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

angular-cli只是在安装过程中退出:

angular-cli just quits during installation:

(myapp)vagrant@myapp-local:/vagrant$ sudo npm install -g angular-cli
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated lodash-node@2.4.1: This package is discontinued. Use lodash@^4.0.0.
(myapp)vagrant@myapp-local:/vagrant$ l mapToRegistry uri https://registry.npmjs.org/serve-static

(myapp)vagrant@myapp-local:/vagrant$ ng
The program 'ng' is currently not installed. To run 'ng' please ask your administrator to install the package 'ng-common'

似乎我同时拥有node和npm的最新版本:

It seems I have latest versions of both node and npm:

(myapp)vagrant@myapp-local:/vagrant$ npm -v
3.10.9
(myapp)vagrant@myapp-local:/vagrant$ node -v
v6.9.1

推荐答案

已解决:所以问题是无所事事的机器的内存,我增加了它的工作范围.

Resolved: So the issue was of memory of vagrant machine I increased it and it worked.

config.vm.provider "virtualbox" do |vb|
    vb.memory = "2048"
end

在最后一步,我不得不做:

At last step I had to do:

sudo ln -s   /home/vagrant/node-v6.9.1-linux-x64/lib/node_modules/angular-cli/bin/ng /usr/bin/ng

这篇关于无法安装angular-cli的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆