我的package.json依赖中有connect-assets,它的package.json是这样的:
"dependencies": {
"connect-file-cache": "0.2.4",
"mime": "1.2.2",
"snockets": "1.3.6",
"underscore": "1.1.7"
},
"devDependencies": {
"async": "0.1.14",
"coffee-script": "~1.3.1",
"connect": "1.8.5",
"nib": "0.2.0",
"bootstrap-stylus": "0.2.0",
"nodeunit": "0.5.4",
"stylus": "0.22.2",
"request": "2.1.1",
"watchit": "0.0.4",
"less": "1.3.0"
}但当我运行npm install(使用或不使用--dev和--dev-all)时,它只安装了connect-assets,没有安装stylus、nib等。
我该怎么办?
发布于 2012-07-26 02:30:26
这很简单,因为npm应该而不是以这种方式工作。如果我想安装一些依赖模块的devDependencies,我必须进入它们的目录。
发布于 2012-12-23 20:00:06
需要注意的是,npm不会传递.npmignore文件中指定的文件。这可能是罪魁祸首,如果有人希望使用devDependency中的文件,这些文件存在于git repo中,但神秘地没有出现在npm交付中。
https://stackoverflow.com/questions/11544641
复制相似问题