Ionic 1 - npm 安装错误 - 工作树中的未知修订
Ionic 1 - npm install error - unknown revision in working tree
安装 npm 包时出现以下错误。
D:\Mobile Project>npm install
npm WARN deprecated gulp-minify-css@0.3.13: Please use gulp-clean-css
npm WARN deprecated cordova-plugin-console@1.1.0: This plugin has been
deprecated since it is now included in the latest versions of cordova-ios
npm ERR! git rev-list -n1 master: fatal: ambiguous argument 'master':
unknown revision or path not in the working tree.
npm ERR! git rev-list -n1 master: Use '--' to separate paths from revisions,
like this:
npm ERR! git rev-list -n1 master: 'git <command> [<revision>...] --
[<file>...]'
npm ERR! git rev-list -n1 master:
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\node.exe"
"C:\Users\naveenkumar\AppData\Roaming\npm\node_modules\npm\bin\npm-
cli.js" "install"
npm ERR! node v6.10.3
npm ERR! npm v4.1.1
npm ERR! code 128
npm ERR! Command failed: git -c core.longpaths=true rev-list -n1 master
npm ERR! fatal: ambiguous argument 'master': unknown revision or path not in
the working tree.
npm ERR! Use '--' to separate paths from revisions, like this:
npm ERR! 'git <command> [<revision>...] -- [<file>...]'
npm ERR!
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! D:\Mobile Project\npm-debug.log
Packages.json 依赖关系:
"dependencies": {
"cordova-plugin-compat": "^1.2.0",
"cordova-plugin-console": "^1.1.0",
"cordova-plugin-device": "^1.1.7",
"cordova-plugin-file": "^4.3.3",
"cordova-plugin-ionic-webview": "^1.1.16",
"cordova-plugin-ios-disableshaketoedit": "^1.0.0",
"cordova-plugin-network-information": "^1.3.4",
"cordova-plugin-splashscreen": "^4.1.0",
"cordova-plugin-statusbar": "^2.3.0",
"cordova-plugin-vibration": "^2.1.6",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-plugin-wkwebview-engine": "^1.1.4",
"cordova-plugin-x-toast": "git+https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin.git",
"cordova-sqlite-storage": "https://github.com/litehelpers/Cordova-sqlite-storage.git",
"cordova-uglify": "^0.2.9",
"gulp": "^3.5.6",
"gulp-concat": "^2.2.0",
"gulp-minify-css": "^0.3.0",
"gulp-rename": "^1.2.0",
"gulp-sass": "^2.0.4",
"ionic-plugin-keyboard": "^2.2.1",
"onesignal-cordova-plugin": "^2.2.2",
"phonegap-plugin-barcodescanner": "git+https://github.com/phonegap/phonegap-plugin-barcodescanner.git"
},
按照 VS code intellisense 的建议更改以下依赖项的版本解决了这个问题。希望它可以帮助别人。 :)
"dependencies": {
....
"cordova-plugin-x-toast":"^2.6.0",
"cordova-sqlite-storage":"^2.1.2",
"phonegap-plugin-barcodescanner":"^7.0.0",
....
}
感谢那些试图解决我的问题的人。
安装 npm 包时出现以下错误。
D:\Mobile Project>npm install
npm WARN deprecated gulp-minify-css@0.3.13: Please use gulp-clean-css
npm WARN deprecated cordova-plugin-console@1.1.0: This plugin has been
deprecated since it is now included in the latest versions of cordova-ios
npm ERR! git rev-list -n1 master: fatal: ambiguous argument 'master':
unknown revision or path not in the working tree.
npm ERR! git rev-list -n1 master: Use '--' to separate paths from revisions,
like this:
npm ERR! git rev-list -n1 master: 'git <command> [<revision>...] --
[<file>...]'
npm ERR! git rev-list -n1 master:
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\node.exe"
"C:\Users\naveenkumar\AppData\Roaming\npm\node_modules\npm\bin\npm-
cli.js" "install"
npm ERR! node v6.10.3
npm ERR! npm v4.1.1
npm ERR! code 128
npm ERR! Command failed: git -c core.longpaths=true rev-list -n1 master
npm ERR! fatal: ambiguous argument 'master': unknown revision or path not in
the working tree.
npm ERR! Use '--' to separate paths from revisions, like this:
npm ERR! 'git <command> [<revision>...] -- [<file>...]'
npm ERR!
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! D:\Mobile Project\npm-debug.log
Packages.json 依赖关系:
"dependencies": {
"cordova-plugin-compat": "^1.2.0",
"cordova-plugin-console": "^1.1.0",
"cordova-plugin-device": "^1.1.7",
"cordova-plugin-file": "^4.3.3",
"cordova-plugin-ionic-webview": "^1.1.16",
"cordova-plugin-ios-disableshaketoedit": "^1.0.0",
"cordova-plugin-network-information": "^1.3.4",
"cordova-plugin-splashscreen": "^4.1.0",
"cordova-plugin-statusbar": "^2.3.0",
"cordova-plugin-vibration": "^2.1.6",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-plugin-wkwebview-engine": "^1.1.4",
"cordova-plugin-x-toast": "git+https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin.git",
"cordova-sqlite-storage": "https://github.com/litehelpers/Cordova-sqlite-storage.git",
"cordova-uglify": "^0.2.9",
"gulp": "^3.5.6",
"gulp-concat": "^2.2.0",
"gulp-minify-css": "^0.3.0",
"gulp-rename": "^1.2.0",
"gulp-sass": "^2.0.4",
"ionic-plugin-keyboard": "^2.2.1",
"onesignal-cordova-plugin": "^2.2.2",
"phonegap-plugin-barcodescanner": "git+https://github.com/phonegap/phonegap-plugin-barcodescanner.git"
},
按照 VS code intellisense 的建议更改以下依赖项的版本解决了这个问题。希望它可以帮助别人。 :)
"dependencies": {
....
"cordova-plugin-x-toast":"^2.6.0",
"cordova-sqlite-storage":"^2.1.2",
"phonegap-plugin-barcodescanner":"^7.0.0",
....
}
感谢那些试图解决我的问题的人。