NPM没有.bin /文件夹

时间:2017-10-20 06:20:31

标签: node.js ubuntu npm

我已经看到了这个问题here,但它已经老了,我尝试了一切,没有任何帮助我。我有一个脚本,只是在vagrant完成后运行安装Ubuntu 17.04。在该脚本中,我执行sudo npm install --no-bin-links来安装先前克隆的项目的依赖项。这是package.json

{
  "name": "project",
  "version": "1.0.0",
  "description": "Just a project",
  "main": "server.js",
  "author": "author",
  "private": true,
  "license": "ISC",
  "dependencies": {
    "async": "^2.5.0",
    "bcrypt": "^1.0.3",
    "body-parser": "^1.17.2",
    "connect-redis": "^3.3.0",
    "cors": "^2.8.4",
    "dotenv": "^4.0.0",
    "express": "^4.15.2",
    "express-rate-limit": "^2.8.0",
    "express-session": "^1.15.4",
    "helmet": "^3.8.0",
    "marked": "^0.3.6",
    "multer": "^1.3.0",
    "mv": "^2.1.1",
    "mysql2": "^1.4.2",
    "request": "^2.82.0",
    "sequelize": "^4.13.2"
  },
  "devDependencies": {
    "chai": "^4.1.2",
    "chai-http": "^3.0.0",
    "mocha": "^4.0.1",
    "sequelize-cli": "^3.0.0"
  }
}

除了需要.bin文件夹的依赖项外,一切都运行良好,例如mochasequelize-cli。当我转到项目的node_modules时,没有.bin文件夹...

有人知道为什么吗?

我跑:
Ubuntu 17.04
节点8.7.0
NPM 5.4.2
还有Vagrant和Windows 10的一切。

1 个答案:

答案 0 :(得分:0)

您应该通过sudo npm install进行安装。 --no-bin-links选项会阻止npm.bin <select id="persons" class="form-group input-group clockpicker form-control selectpicker" style="width:300px;"> <option value="1">1 Pers. <option value="2">2 Pers. <option value="3">3 Pers. <option value="4">4 Pers. <option value="5">5 Pers. <option value="6">6 Pers. <option value="7">7 Pers. <option value="8">8 Pers. </select> <select id="table" class="form-group input-group clockpicker form-control selectpicker" style="width:300px;"> <option value="4">Table: 1 <option value="8">Table: 2 <option value="2">Table: 3 <option value="2">Table: 4 <option value="2">Table: 5 <option value="4">Table: 6 <option value="2">Table: 7 <option value="2">Table: 8 <option value="2">Table: 9 <option value="4">Table: 10 <option value="6">Table: 11 <option value="4">Table: 12 <option value="4">Table: 13 <option value="4">Table: 14 <option value="4">Table: 15 <option value="4">Table: 16 <option value="2">Table: 17 <option value="2">Table: 18 <option value="4">Table: 19 <option value="4">Table: 20 <option value="4">Table: 21 <option value="4">Table: 22 <option value="6">Table: 23 <option value="6">Table: 24 </select> 到每个已​​安装软件包中的实际二进制文件。 AFAIK,adding symlinks,这仅适用于没有符号链接的系统。