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

查看:31
本文介绍了无法安装 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

推荐答案

已解决:原来是 vagrant 机器内存的问题,我增加了它,它起作用了.

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

最后一步我必须做:

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天全站免登陆