I've created a package.json
file for my private app. In it, I have my dependencies listed, as expected. Some of those dependencies have dependencies of their own. When running npm install
on my app, it's not installing the dependencies of my dependencies. Is there something wrong with my package.json file which is preventing this? ("winston" is one of my dependencies which isn't properly installing)
{
"name": "my app",
"version": "0.0.1",
"dependencies" : {
"connect" : "1.8.5",
"express" : "2.5.8",
"socket.io" : "0.8.7",
"winston" : "0.5.9"
},
"engine": {
"node": ">=0.6"
}
}
Reponse to comments: NPM installs the top level deps, fine, no errors, it looks like it works. It just never downloads the deps of the deps. Will try the -d option.
Spaces are not allowed in the name
option for package.json files.
The name ends up being part of a URL, an argument on the command line, and a folder name. Therefore, the name can't contain any non-URL-safe characters.
我有同样的问题,并通过一些谷歌搜索,这似乎是 node.js 中的一个问题: https : //github.com/isaacs/npm/issues/1341
I noticed the winston
line is ended with ,
This is not a valid JSON.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.