【问题标题】:"npm install" insall nothing to node_modules folder but a .staging folder centos 7“npm install”什么都没有安装到node_modules文件夹中,而是一个.staging文件夹centos 7
【发布时间】:2017-01-01 08:26:31
【问题描述】:

我有这个 package.json

{
  "name": "jangkoo",
  "version": "0.0.0",
  "private": true,
  "dependencies": {
    "keystone": "^0.3.19",
    "async": "^1.5.0",
    "lodash": "^4.13.1",
    "node-sass": "^3.3.2",
    "node-sass-middleware": "^0.9.7", 
    "dotenv": "^2.0.0"
  },
  "devDependencies": {
    "eslint": "^2.12.0",
    "eslint-config-keystone": "^2.3.1",
    "eslint-plugin-react": "^5.1.1",
    "gulp": "^3.7.0",
    "gulp-shell": "^0.5.0",
    "gulp-watch": "^4.3.5",
    "gulp-sass": "^2.0.4"

  },
  "scripts": {
    "lint": "eslint .",
    "start": "node keystone.js"
  }
}

当我运行 npm install 时,它创建了一个 node_modules,里面有一个 .staging 文件夹。没有安装其他模块。这里有什么问题?操作系统是 Centos 7。

【问题讨论】:

    标签: node.js centos


    【解决方案1】:

    npm install 在安装过程中临时将所有node_modules 添加到.staging 文件夹中。如果在安装过程中出现问题,例如内存不足,您可能会被这个包含 .staging 文件夹的奇怪 node_modules 安装卡住。

    https://github.com/npm/npm/issues/12540

    【讨论】:

      【解决方案2】:

      为 centos 安装 npm

      yum update
      

      yum 安装 npm

      【讨论】:

        【解决方案3】:

        我发现了。它无法安装keystone然后它停止了。这就是为什么没有安装任何东西的原因。

        【讨论】:

          【解决方案4】:

          如何删除 node_modules 文件夹并再次运行 npm install

          【讨论】:

            猜你喜欢
            • 2020-07-25
            • 2016-11-23
            • 1970-01-01
            • 1970-01-01
            • 2016-03-25
            • 2013-12-24
            • 2016-10-29
            • 2019-04-13
            • 2021-01-30
            相关资源
            最近更新 更多