Ich musste die Version meiner npm App von 0.1 auf 0.0.1 ändern, damit npm das nicht tut.npm: Warum ist eine Version "0.1" ungültig?
$ npm install
npm ERR! install Couldn't read dependencies
npm ERR! Error: invalid version: 0.1
npm ERR! at validVersion (/usr/local/Cellar/node/0.10.5/lib/node_modules/npm/node_modul
es/read-package-json/read-json.js:571:40)
npm ERR! at final (/usr/local/Cellar/node/0.10.5/lib/node_modules/npm/node_modules/read
-package-json/read-json.js:323:23)
npm ERR! at /usr/local/Cellar/node/0.10.5/lib/node_modules/npm/node_modules/read-packag
e-json/read-json.js:139:33
npm ERR! at cb (/usr/local/Cellar/node/0.10.5/lib/node_modules/npm/node_modules/slide/l
ib/async-map.js:48:11)
npm ERR! at /usr/local/Cellar/node/0.10.5/lib/node_modules/npm/node_modules/read-packag
e-json/read-json.js:301:48
npm ERR! at fs.js:207:20
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <[email protected]>
npm ERR! System Darwin 12.3.0
npm ERR! command "/usr/local/Cellar/node/0.10.5/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/lust/Documents/ply/dev-server
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/lust/Documents/ply/dev-server/npm-debug.log
npm ERR! not ok code 0
Der Vollständigkeit halber ist hier die Arbeits json
$ cat package.json
{
"name": "ply",
"description": "ply server for local dev testing deployments",
"version": "0.0.1",
"private": true,
"dependencies": {
"express": "3.x"
}
}
Version verwendet "0.1" zu sein, wenn er den Fehler gemacht.
Ist dies eine Version der API/ABI-Kompatibilität, die 3 Sätze Versionsnummern erfordert? Warum ist die Fehlermeldung nicht freundlicher w.r.t. Dies?
werfen Sie einen Blick auf den Befehl 'npm version'. Es ermöglicht Ihnen, die semantische Version basierend auf Haupt-, Neben- oder Patch-Ebenen zu erhöhen. Beispiele: 'npm Version major',' npm Version minor', 'npm Version patch' – Noah