【问题标题】:NPM install error: RangeError: Maximum call stack size exceededNPM 安装错误:RangeError:超出最大调用堆栈大小
【发布时间】:2016-01-20 22:14:26
【问题描述】:

我正在尝试通过 package.json 文件在 Ubuntu 14.04.3 (Linux ubuntu 3.13.0-45-generic #74-Ubuntu) 上安装我的 npm 依赖项。我不知道这是否重要,但 Ubuntu 是一个虚拟机。我在 /tmp 目录中安装依赖项,因此它不是任何共享文件夹或 samba 资源。

Node.js 版本:0.12.7。

Npm 版本:3.3.9。

包.json:

{
    ...
    "devDependencies": {
        "babel-loader": "5.3.*",
        "bootstrap": "3.3.*",
        "css-loader": "0.19.*",
        "del": "2.0.*",
        "extract-text-webpack-plugin": "0.8.*",
        "file-loader": "0.8.*",
        "gulp": "3.9.*",
        "gulp-eslint": "1.0.*",
        "gulp-util": "3.0.*",
        "html-loader": "0.3.*",
        "karma": "0.13.*",
        "karma-chai-plugins": "0.6.*",
        "karma-mocha": "0.2.*",
        "karma-phantomjs-launcher": "0.2.*",
        "karma-webpack": "1.7.*",
        "mocha": "2.3.*",
        "phantomjs": "1.9.*",
        "style-loader": "0.12.*",
        "url-loader": "0.5.*",
        "webpack": "1.12.*",
        "yargs": "3.27.*"
    },
    "engines": {
        "node": ">= 0.12.0"
    }
    "dependencies": {
        "express": "4.13.*"
    }
}

我使用 --no-bin-links 安装标志(我需要将 node_modules 目录复制到另一个基于 NTFS 的位置)。

当我安装依赖项时出现以下错误:

RangeError: Maximum call stack size exceeded
    at emit (events.js:107:17)
    at null.<anonymous>(/usr/lib/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/index.js:14:10)
    at emit (events.js:107:17)
    at null.<anonymous> (/usr/lib/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/index.js:14:10)
    at emit (events.js:107:17)
    at null.<anonymous> (/usr/lib/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/index.js:14:10)
    at emit (events.js:107:17)
    at null.<anonymous> (/usr/lib/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/index.js:14:10)
    at emit (events.js:107:17)
at TrackerGroup.finish (/usr/lib/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/index.js:60:8)

有人知道如何解决吗?

【问题讨论】:

标签: node.js ubuntu npm


【解决方案1】:

您很可能遇到过 NPM 问题 #9224#9239

要解决这些问题,您可以将软件包安装到不带 --no-bin-links 标志的 /tmp 中,并确保之后将符号链接替换为文件/目录。您可以使用rsync -L 将文件复制到 NTFS,并将符号链接转换为引用文件和目录。

【讨论】:

    猜你喜欢
    • 2021-09-21
    • 2018-02-06
    • 2019-03-12
    • 2019-05-14
    • 2021-07-31
    • 2019-02-07
    • 2012-08-14
    相关资源
    最近更新 更多