2017-12-01 9 views
0

npmパッケージをインストールする際に次のエラーが発生します。Ionic 1 - npmインストールエラー - 作業ツリーの不明なリビジョン[SOLVED]

D:\Mobile Project>npm install 
npm WARN deprecated [email protected]: Please use gulp-clean-css 
npm WARN deprecated [email protected]: 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" 
}, 

EDITどういうわけ

、代わりのバージョン番号は、githubのパスがpackages.jsonの依存関係に保存されています。選択した答えのように変更して解決しました。 :)

答えて

0

VSコードintellisenseが示唆しているように、次の依存関係のバージョンを変更しました。それが他人を助けるかもしれないことを願って:)

"dependencies": { 
    .... 
    "cordova-plugin-x-toast":"^2.6.0", 
    "cordova-sqlite-storage":"^2.1.2", 
    "phonegap-plugin-barcodescanner":"^7.0.0", 
    .... 
} 

私の問題を解決しようとした人に感謝します。

関連する問題