npm package.json bin chmod错误

时间:2015-04-17 19:24:05

标签: node.js npm package.json

我创建了一个npm包,我正在尝试从git存储库安装它。当我运行npm install /path/to/package/ --no-bin-links时,一切正常,但我将package.json设置为将主JS文件链接到bin。当我尝试正常安装软件包时,出现以下错误:

npm ERR! path /staging/webshares/proj-test/node_modules/jkvc-project/index.js
npm ERR! code ENOENT
npm ERR! errno -2

npm ERR! enoent ENOENT, chmod '/staging/webshares/proj-test/node_modules/jkvc-project/index.js'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.

index.js文件肯定存在,package.json中的所有内容看起来都很正常:

{
  "name": "jkvc-project",
  "version": "1.0.0",
  "description": "JKD Project Build Tool",
  "dependencies": {
    "bower": "^1.4.1",
    "mkdirp": "^0.5.0",
    "optimist": "~0.6.0",
    "prompt": "~0.2.12",
    "q": "~1.0.0",
    "request": "~2.33.0"
  },
  "files": [
    "./scss"
  ],
  "bin": "./index.js"
}

我尝试了npm cache clean,但它没有帮助。我的目录中还有一个空白的.npmignore文件。

是否有人知道导致此chmod错误的原因,以及如何解决此问题?

这是我的包的文件夹结构:

scss
.gitignore
.npmignore
index.js
package.json

0 个答案:

没有答案