mein package.json hat die folgende Abhängigkeit,
{
"name": "AppName",
"version": "0.0.0",
"description": "App Description",
"author": "@author",
"dependencies": {},
"devDependencies": {
"css-flip": "git://github.com/geedmo/css-flip",
"gulp": "^3.8.10",
"gulp-angular-htmlify": "^0.4.0",
"gulp-changed": "^1.1.0",
"gulp-compass": "^2.0.4",
"gulp-concat": "^2.4.1",
"gulp-css-flip": "^0.4.0",
"gulp-expect-file": "0.0.7",
"gulp-filter": "^1.0.2",
"gulp-html-prettify": "0.0.1",
"gulp-if": "^1.2.5",
"gulp-ignore": "^1.2.1",
"gulp-jade": "^0.8.0",
"gulp-jsvalidate": "^2.0.0",
"gulp-less": "^1.3.9",
"gulp-livereload": "^2.1.1",
"gulp-load-plugins": "^0.10.0",
"gulp-minify-css": "^0.3.11",
"gulp-ng-annotate": "^0.4.3",
"gulp-rename": "^1.2.0",
"gulp-sass": "^1.3.2",
"gulp-sourcemaps": "^1.3.0",
"gulp-sync": "^0.1.4",
"gulp-uglify": "^1.1.0",
"gulp-util": "^3.0.1",
"marked": "^0.3.2",
"through2": "^0.6.3",
"yargs": "^3.7.2"
},
"scripts": {
"prestart": "bower install",
"start": "npm install",
"poststart": "gulp"
}
}
wenn ich den Befehl npm install
ausführen, erhalte ich die folgende Fehlermeldung:
npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config --get remote.Origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit at ChildProcess.exithandler (child_process.js:751:12)
npm WARN addRemoteGit at ChildProcess.emit (events.js:110:17)
npm WARN addRemoteGit at maybeClose (child_process.js:1015:16)
npm WARN addRemoteGit at Socket.<anonymous> (child_process.js:1183:11)
npm WARN addRemoteGit at Socket.emit (events.js:107:17)
npm WARN addRemoteGit at Pipe.close (net.js:485:12)
npm WARN addRemoteGit git://github.com/geedmo/css-flip.git resetting remote C:\Users\drj8cob\AppData\Roaming\npm-cache\_git-remotes\git-github-com-geedmo-css-flip-git-3c35004c because of error: {
[Error: Command failed: git -c core.longpaths=true config --get remote.Origin.url
npm WARN addRemoteGit ]
npm WARN addRemoteGit killed: false,
npm WARN addRemoteGit code: 1,
npm WARN addRemoteGit signal: null,
npm WARN addRemoteGit cmd: 'git -c core.longpaths=true config --get remote.Origin.url' }
npm ERR! git clone --template=C:\Users\drj8cob\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/geedmo/css-flip.git C:\Users\drj8cob\AppData\Roaming\npm-cache\_git-remot
es\git-github-com-geedmo-css-flip-git-3c35004c: Cloning into bare repository 'C:\Users\drj8cob\AppData\Roaming\npm-cache\_git-remotes\git-github-com-geedmo-css-flip-git-3c35004c'...
npm ERR! git clone --template=C:\Users\drj8cob\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/geedmo/css-flip.git C:\Users\drj8cob\AppData\Roaming\npm-cache\_git-remot
es\git-github-com-geedmo-css-flip-git-3c35004c: fatal: Unable to look up github.com (port 9418) (No such Host is known. )
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code 128
npm ERR! Command failed: git -c core.longpaths=true clone --template=C:\Users\drj8cob\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/geedmo/css-flip.git C:\Users\drj8c
ob\AppData\Roaming\npm-cache\_git-remotes\git-github-com-geedmo-css-flip-git-3c35004c
npm ERR! Cloning into bare repository 'C:\Users\drj8cob\AppData\Roaming\npm-cache\_git-remotes\git-github-com-geedmo-css-flip-git-3c35004c'...
npm ERR! fatal: Unable to look up github.com (port 9418) (No such Host is known. )
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
Ich bin neu bei Knotenmodulen und Git. Muss ich eine Konfiguration in Bezug auf GIT in Knotenmodulen vornehmen?
[Bearbeiten]: Ich stehe hinter einem Unternehmensvertreter. Müssen Sie dazu eine Konfiguration angeben? Ich habe Proxy-Details in der .npmrc-Datei in der users/<username>/.npmrc
-Datei hinzugefügt. Meine Pfadvariable hat auch die Position von Git/bin.
Diese Frage hat eine Antwort in einem anderen thread. Das Problem trat auf, seit ich hinter der Unternehmensvertretung stand. Und die Antwort von @ bnguyen82 hat mir schließlich geholfen.
Ich habe nur den folgenden Befehl verwendet und das Problem wurde behoben.
git config --global url."https://".insteadOf git://
Die akzeptierte Antwort allein hat mir nicht geholfen. Schließlich funktionierte es, nachdem ich den npm-Cache mit npm cache clear
gelöscht hatte.
1.Überprüfen Sie Ihre Internetverbindung
2.ping-Test an github.com in TERMINAL oder CMD
Wenn alles gut funktioniert, versuchen Sie, dieses Format für Ihre Git-URL git+https://[email protected]/geedmo/css-flip.git
zu verwenden.
oder
wenn du ssh brauchst:
git+ssh://[email protected]/visionmedia/express.git
Ich hatte das gleiche Problem und konnte es durch die Installation von git lösen
Sudo apt-get install git-all
Im nicht interaktiven Modus
Git Bash in dem Ordner, in dem Sie Ihr Projekt einrichten möchten
expo init AwesomeProject --template blank --workflow managed --name yourappname
Git kann nicht mit der angegebenen URL verlinkt werden. Sie können den Git-Proxy-Modus ausprobieren. (Benötigen Sie einen eigenen Proxy-Dienst)
Die Einstellungen:
git config –global http.proxy http://127.0.0.1:1080
git config –global https.proxy https://127.0.0.1:1080
Einstellung abbrechen:
git config –global –unset http.proxy
git config –global –unset https.proxy