无法使用我的 package.json 安装依赖包

Unable to install a dependencies package using my package.json

我有一个 package.json 但是当我在我的命令控制台中尝试 运行 它时我得到了这个错误:

$ npm install
npm ERR! install Couldn't read dependencies
npm ERR! Windows_NT 5.1.2600
npm ERR! argv "C:\Program Files (x86)\nodejs\\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v0.12.2
npm ERR! npm  v2.7.4

npm ERR! Invalid version: "0.1"
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     F:\UwAmp\www\nodejs\express\npm-debug.log

这是我的 package.json

{
    "name": "Express101",
    "version": "0.1",
    "description": "This is a practice demo for express node",
    "main": "app.js",
    "author": {
        "name": "Juan Dela Cruz",
        "email": "jdcruz01@gmail.com"
    },
    "dependencies": {
        "express": "^4.13.3",
        "jade": "^1.11.0"
    }
}

你能帮我解决这个问题吗?说我的版本部分有误

答案在错误信息中:

npm ERR! Invalid version: "0.1"

在你的 package.json 中,你有这个:

"version": "0.1",`

您需要对其进行格式化以满足 semver 要求(请参阅 npm package.json docs and the node-semver repo)。在前面添加一个 0 (0.0.1),您的错误应该消失。