npm安装ember-cli超过最大调用堆栈大小 [英] npm install ember-cli Maximum call stack size exceeded

查看:1008
本文介绍了npm安装ember-cli超过最大调用堆栈大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这个问题上遇到类似的问题: Win 8.1,Vagrant,Chef,Ubuntu,Ember-cli,ember newnpm ERR! tar.unpack untar error /home/vagrant/.npm/"

I'm facing a similar issue found in this question: Win 8.1, Vagrant, Chef, Ubuntu, Ember-cli, ember new "npm ERR! tar.unpack untar error /home/vagrant/.npm/"

我正在尝试使用新的ember将旧的ember项目更新为2.1 -cli。
我在一个流氓服务器上运行我的项目。

I'm trying to update an older ember project to 2.1 using the new ember-cli. I'm running my project on a vagrant server.

我有节点(v.0.12.7),npm(3.3.10),bower 1.6.5)安装
和ember-cli -g(版本:1.13.8,节点:0.12.7,npm:2.13.4,os:linux x64)。

I have node (v.0.12.7), npm (3.3.10), bower (1.6.5) and ember-cli -g (version: 1.13.8, node: 0.12.7, npm: 2.13.4, os: linux x64) installed.

然而,每当我在ember init生成的项目上运行npm install --no-bin-links时,我得到以下错误:

Yet, whenever I'm running "npm install --no-bin-links" on the project generated by ember init I get the following error:

51716 error tar.unpack untar error /home/vagrant/.npm/ember-cli/1.13.8/package.tgz
51717 verbose stack RangeError: Maximum call stack size exceeded
51717 verbose stack     at Array.filter (native)
51717 verbose stack     at /usr/lib/node_modules/npm/lib/install/actions.js:55:37
51717 verbose stack     at Array.forEach (native)
51717 verbose stack     at markAsFailed (/usr/lib/node_modules/npm/lib/install/actions.js:54:16)
51717 verbose stack     at /usr/lib/node_modules/npm/lib/install/actions.js:57:7
51717 verbose stack     at Array.forEach (native)
51717 verbose stack     at markAsFailed (/usr/lib/node_modules/npm/lib/install/actions.js:54:16)
51717 verbose stack     at /usr/lib/node_modules/npm/lib/install/actions.js:57:7
51717 verbose stack     at Array.forEach (native)
51717 verbose stack     at markAsFailed (/usr/lib/node_modules/npm/lib/install/actions.js:54:16)
51718 verbose cwd /at/Site/public/preview/EP
51719 error Linux 3.2.0-4-amd64
51720 error argv "node" "/usr/bin/npm" "i"
51721 error node v0.12.7
51722 error npm  v3.3.10
51723 error Maximum call stack size exceeded
51724 error If you need help, you may report this error at:
51724 error     <https://github.com/npm/npm/issues>
51725 verbose exit [ 1, true ]

这是否与不同的版本号npm(全球和ember-cli)还是在我的流氓设置中的这个东西?这个问题不是由windows最大路径长度引起的,我已经检查了。

Is this related to the different version numbers of npm (globally and in ember-cli) or is this something in my vagrant setup? This problem isn't caused by the windows max path length, I've already checked.

编辑

我试图单独安装npm软件包,而不是使用npm install --no-bin-links。唯一的失败是npm install --no-bin-links ember-cli@1.13.8。这些是我的package.json中的依赖项:

I've tried to install the npm packages separately instead of with "npm install --no-bin-links". The only one failing is "npm install --no-bin-links ember-cli@1.13.8". These are the dependencies within my package.json:

"broccoli-asset-rev": "^2.1.2",
"ember-cli": "1.13.8",
"ember-cli-app-version": "0.5.0",
"ember-cli-babel": "^5.1.3",
"ember-cli-content-security-policy": "0.4.0",
"ember-cli-dependency-checker": "^1.0.1",
"ember-cli-htmlbars": "0.7.9",
"ember-cli-htmlbars-inline-precompile": "^0.2.0",
"ember-cli-ic-ajax": "0.2.1",
"ember-cli-inject-live-reload": "^1.3.1",
"ember-cli-qunit": "^1.0.0",
"ember-cli-release": "0.2.3",
"ember-cli-sri": "^1.0.3",
"ember-cli-uglify": "^1.2.0",
"ember-data": "1.13.8",
"ember-disable-proxy-controllers": "^1.0.0",
"ember-export-application-global": "^1.0.3"

谢谢你的时间

推荐答案

我已经解决了我的问题。

I've fixed my problem.

事实证明,方式我的文件夹被安装在我的流氓是如此缓慢,它干扰了我的npm失速。
在我的流氓文件中,文件夹是这样安装的:

As it turns out, the way My folder was mounted in my vagrant was so slow it interfered with my npm install. In my vagrant file the folder was mounted like so:

config.vm.synced_folder "../", "/at"

我已经用这个替换了:

config.vm.provision "shell", run: "always" do |s|
    s.inline = "sudo apt-get update
    sudo bash /vagrant/mountfolder.sh"
end

在我的流氓文件旁边,我放了一个文件mountfolder.sh

And next to my vagrant file I've placed a file "mountfolder.sh"

# replace your username and password with for example: user, ****. Replace YOURSHARENAME with the name of your windows share 
# mountpoint checks if share is already mounted, prevents warning when provisioning
mountpoint -q /projects|| (mkdir /projects -p && apt-get -y install cifs-utils && mount -t cifs //192.168.255.1/YOURSHARENAME /projects --verbose -o 'user=dkdomain.intra\YOURUSERNAME,password=YOURPASSWORD,rw,uid=vagrant,gid=vagrant,file_mode=0777,dir_mode=0777')

您必须用必需资料替换大都会。

Where you replace the capitals with the necessairy info.

这篇关于npm安装ember-cli超过最大调用堆栈大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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