Cannot install via npm
MacOS Sierra, [email protected], [email protected]
I posted this issue also at npm …
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'angular-cli' ]
2 info using [email protected]
3 info using [email protected]
4 verbose stack Error: Cannot find module 'github-url-from-git'
4 verbose stack at Function.Module._resolveFilename (module.js:470:15)
4 verbose stack at Function.Module._load (module.js:418:25)
4 verbose stack at Module.require (module.js:498:17)
4 verbose stack at require (internal/module.js:20:19)
4 verbose stack at Object.
@KlausEichinger I am afraid this is not enough context to be able to assist you.
What exactly are you trying to do ? Where did you start off, which commands did you perform up-to the error provided ?
Hi. Can you please provide the command line? Also, have you tried to add sudo at the beginning of your command line? Please let us know. Cheers...!
I'd also suggest updating npm.
Thank you for you interest. I tried to install a new angular project via angular-cli. In Terminal I called 'sudo npm install -g angular-cli'. Like it is recommended on cli.angular.io. This attempt failed several times with error message as written above.
My MacOS, Node and npm are up to date as you can see above.
@KlausEichinger
Lieber Klaus
Du musst schon mehr herausrücken. Mit dem Wenigen, dass Du preisgibst, können wir Dir nicht wirklich helfen.
Du kannst mal damit anfangen, dass Du genau angibst, was Du genau wo eintippst. Sonst sind wir nur noch am Raten und Mutmassen, was echt niemanden weiterbringt. Weniger vage beschreiben und mal konkret Dinge beim Namen nennen.
Wie hast Du z.B. nodeJS installiert, das fehlt komplett.
Also, der Ball ist bei Dir.
Ich verwende i.Ü. ebenfalls macOS Sierra 10.12.2, nodeJS 7.4.0 und npm 4.1.2. Habe vor wenigen Stunden npm von 4.0.5 auf 4.1.2 aufgefrischt, ohne Fehler.
If you search for the error "Cannot find module 'github-url-from-git'", there are plenty of hits, such as https://github.com/nodejs/node/issues/3540.
Most of the hits suggest to get rid of your node installation, and re-install nodeJS.
Is that an option for you ? Your installation seems to be broken. I have installed nodeJS for a long time, every 2 to 3 months. Never had to de-install a version, never had to delete the folder /usr/local/lib/node_modules/.
Hallo lieber @catull,
ich arbeite nicht erst seit heute früh als Entwickler. Was verstehst nicht du nicht daran, dass ich ein Angular(2) Projekt aufsetzen möchte? Dazu möchte ich angular-cli nutzen. Mit Node und npm arbeite ich auch schon etwas länger ;)
Wie du aus dem von npm erzeugten und oben zitierten Protokll ersehen kannst, sind alle Komponenten auf neuestem Stand. Wenn du also etwas konkret wissen möchtest, stelle bitte auch konkrete Fragen.
@GuriSoft the command line output is
Last login: Sun Jan 29 19:42:23 on ttys000 Klaus-MacBook-Pro:~ klaus$ sudo npm install -g angular-cli Password: npm ERR! Darwin 16.4.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "angular-cli" npm ERR! node v7.4.0 npm ERR! npm v4.0.5 npm ERR! code MODULE_NOT_FOUND
npm ERR! Cannot find module 'github-url-from-git' 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! /Users/klaus/npm-debug.log Klaus-MacBook-Pro:~ klaus$
FYI: https://cli.angular.io/
What happens if you re-install ng CLI ?
sudo npm uninstall -g angular-cli
sudo npm cache clean
sudo npm install -g angular-cli
Same error ?
Do you have node modules in /usr/local/lib/node_modules, as well as in /Users/klaus/.npm ??
What happens if you re-install ng CLI ? I did twice. Same error.
On my office mac I'd installed angular-cli successful two weeks ago. But I can't find any differences in the settings.
Do you have node modules in /usr/local/lib/node_modules, as well as in /Users/klaus/.npm ??
I don't think npm is the problem. I can install other components like bootstrap via npm.
Have you thought of giving yarn a chance ?
Not yet.
I try to combine angular w/ react, because of a better rendering from react components. My experiences w/ npm are throughout positive.
Actually, yarn is a different node package manager/installer. You'd have to install it from npm, or install it from https://yarnpkg.com/.
Once installed, you can do this:
sudo yarn global add angular-cli@latest
It works super-fast. Just did it again, and it was done in just under 70 seconds.
Can you try this ?
I just tried to install Yarn. Sounds fine. But npm failed!
Klaus-MacBook-Pro:~ klaus$ sudo npm install -g yarn Password: npm ERR! Darwin 16.4.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "yarn" npm ERR! node v7.4.0 npm ERR! npm v4.0.5 npm ERR! code MODULE_NOT_FOUND
npm ERR! Cannot find module 'github-url-from-git' 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! /Users/klaus/npm-debug.log
I will go up and clean up my Mac manually tomorrow.
You see, about the same problem, to do with "Cannot find module 'github-url-from-git'" When was the last time you were able to install something successfully ?
On my Mac, this is what I get with
npm -g list github-url-from-git
npm -g list github-url-from-git
/usr/local/lib
├── UNMET PEER DEPENDENCY @angular/compiler@<=2.3 >=2.2.0
├── UNMET PEER DEPENDENCY @angular/core@<=2.3 >=2.2.0
├── UNMET PEER DEPENDENCY [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│ └── [email protected]
├── UNMET PEER DEPENDENCY requirejs@^2.1.0
└── UNMET PEER DEPENDENCY [email protected]
Very suspicious, npm version 2.15.9 !!!
Do you have node modules in /usr/local/lib/node_modules, as well as in /Users/klaus/.npm ?? in /usr/local/lib/node_modules there is a npm folder, in /Users/klaus/.npm there only a folder w/ node-modules-path
When was the last time you were able to install something successfully ? between the last two weeks ago
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "-g" "list" "github-url-from-git"
npm ERR! node v7.4.0
npm ERR! npm v4.0.5
npm ERR! code MODULE_NOT_FOUND
npm ERR! Cannot find module 'github-url-from-git'
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! /Users/klaus/npm-debug.log
Klaus-MacBook-Pro:~ klaus$