Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing `github-url-from-git` from npm@3 in Node v5 RC1 #3540

Closed
rvagg opened this issue Oct 27, 2015 · 36 comments

Comments

@rvagg
Copy link
Member

commented Oct 27, 2015

If you have this issue, please run sudo rm -rf /usr/local/lib/node_modules/ and try installing again. ~Fishrock123


Just released v5.0.0 RC 1 and npm is borked:

$ npm i bl
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "bl"
npm ERR! node v5.0.0-rc.1
npm ERR! npm  v3.3.6
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!     /private/tmp/npm-debug.log
$ grep -R github-url-from-git /usr/local/lib/node_modules/npm
/usr/local/lib/node_modules/npm/CHANGELOG.md:  `github-url-from-git@1.4.0`: add support for git+https and git+ssh
/usr/local/lib/node_modules/npm/CHANGELOG.md:  `github-url-from-git@1.4.0`: add support for git+https and git+ssh
/usr/local/lib/node_modules/npm/CHANGELOG.md:  `github-url-from-git@1.2.0` ([@isaacs](https://github.com/isaacs))
/usr/local/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js:var parseGitHubURL = require("github-url-from-git")
/usr/local/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/package.json:    "github-url-from-git": "^1.3.0",
$ find /usr/local/lib/node_modules/ -name github-url-from-git
$

/cc @iarna @Fishrock123

@Fishrock123

This comment has been minimized.

Copy link
Member

commented Oct 27, 2015

So it doesn't exist? I.e not checked in? Can you check if it's in the source?

On Oct 26, 2015, at 9:47 PM, Rod Vagg notifications@github.com wrote:

Just released v5.0.0 RC 1 and npm is borked:

$ npm i bl
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "bl"
npm ERR! node v5.0.0-rc.1
npm ERR! npm v3.3.6
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! /private/tmp/npm-debug.log
$ grep -R github-url-from-git /usr/local/lib/node_modules/npm
/usr/local/lib/node_modules/npm/CHANGELOG.md: github-url-from-git@1.4.0: add support for git+https and git+ssh
/usr/local/lib/node_modules/npm/CHANGELOG.md: github-url-from-git@1.4.0: add support for git+https and git+ssh
/usr/local/lib/node_modules/npm/CHANGELOG.md: github-url-from-git@1.2.0 (@isaacs)
/usr/local/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js:var parseGitHubURL = require("github-url-from-git")
/usr/local/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/package.json: "github-url-from-git": "^1.3.0",
$ find /usr/local/lib/node_modules/ -name github-url-from-git
$
/cc @iarna @Fishrock123


Reply to this email directly or view it on GitHub.

@rvagg

This comment has been minimized.

Copy link
Member Author

commented Oct 27, 2015

in core

$ find deps/npm/ -name github-url-from-git
$

same as #3494 I suppose

@evanlucas

This comment has been minimized.

Copy link
Member

commented Oct 27, 2015

Is that even a dependency still?

@evanlucas

This comment has been minimized.

Copy link
Member

commented Oct 27, 2015

strange, RC1 works fine for me on OS X

@mscdex mscdex added the npm label Oct 27, 2015

@targos

This comment has been minimized.

Copy link
Member

commented Oct 27, 2015

Is it possible to install it with nvm ? cc @ljharb

@ljharb

This comment has been minimized.

Copy link
Member

commented Oct 27, 2015

@targos sadly I haven't yet had time to finish implementing it. Follow progress at nvm-sh/nvm#779

@iarna

This comment has been minimized.

Copy link
Member

commented Oct 27, 2015

That module isn't used by npm@3 at all (it was supplanted by the more general hosted-git-info)....

🕐  rebecca@Caldina:~/code/release/node$ [master] git rev-parse master
29da8cf8d7ab8f66b9091ab22664067d4468461e
🕐  rebecca@Caldina:~/code/release/node$ [master] grep -R github-url-from-git deps/npm
deps/npm/CHANGELOG.md:  `github-url-from-git@1.4.0`: add support for git+https and git+ssh
deps/npm/CHANGELOG.md:  `github-url-from-git@1.4.0`: add support for git+https and git+ssh
deps/npm/CHANGELOG.md:  `github-url-from-git@1.2.0` ([@isaacs](https://github.com/isaacs))
🕐  rebecca@Caldina:~/code/release/node$ [master]

I'd love to know what module your npm-debug.log says was trying to load it.

@iarna

This comment has been minimized.

Copy link
Member

commented Oct 27, 2015

(#3494 is caused by node's .gitignore including super broad patterns that include files required by npm, so definitely not related.)

@Fishrock123

This comment has been minimized.

Copy link
Member

commented Oct 27, 2015

I am unable to reproduce on windows with a basic setup, and it also seems to work fine for @evanlucas.

@rvagg I think this is on your end.

@targos

This comment has been minimized.

Copy link
Member

commented Oct 27, 2015

I am also unable to reproduce on OSX

@rvagg

This comment has been minimized.

Copy link
Member Author

commented Oct 27, 2015

sudo rm -rf /usr/local/lib/node_modules/ and reinstalling fixed for me, would love an explanation of why I might have been hit with this to know if this might be a general problem with v5.0.0 when goes out? perhaps a particular upgrade path (I'm experimenting with different options now)

@Fishrock123

This comment has been minimized.

Copy link
Member

commented Nov 2, 2015

Maybe related to #3606

@rvagg rvagg closed this Nov 3, 2015

@jbergens

This comment has been minimized.

Copy link

commented Nov 12, 2015

I still get this with npm 5.0.0 (not rc) on Windows. Might be some installation issue with the upgrade. I also have moved my npm folder to /dev/npm instead of {APPDATA}/npm and updated npmrc.

@chrilith

This comment has been minimized.

Copy link

commented Nov 12, 2015

Hi,

Just install Node.js v5.0.0 with npm 3.3.6 on Windows over an existing v0.12.x and I had the same issue.

It seems that some old dependencies remain on the machine (the old folder nodejs/npm isn't removed) on installation.

Removing everything fixed the problem for me.

Thanks

@GregWoods

This comment has been minimized.

Copy link

commented Nov 13, 2015

Same for me @chrilith.

  • Uninstall
  • Manually delete residual Program Files/Nodejs folder
  • Reinstall

Problem gone.
Thanks

@jokeyrhyme

This comment has been minimized.

Copy link

commented Nov 18, 2015

A colleague on OS X installed the Node.js 4.2.2 LTS, then installed/upgraded to the Node.js 5.1.0 stable (using the .pkg files from the official website). We ended up with the issue reported here, and had to manually uninstall Node.js and reinstall 5.1.0 in order to fix things. Just FYI.

@krisgnyc

This comment has been minimized.

Copy link

commented Dec 7, 2015

Same problem here...Had to delete node_modules in usr/local/lib/ to fix things

@kruncher

This comment has been minimized.

Copy link

commented Dec 10, 2015

Again, same issue for me on OS X. But oddly I did not experience this issue on Windows 7.

@surger

This comment has been minimized.

Copy link

commented Dec 19, 2015

Had a same troubles on Windows 7 x64

npm info using npm@3.3.12
npm info using node@v5.3.0

Download zip and install to
Program Files (x86)\nodejs\node_modules\npm\node_modules\
two npm packages:
https://github.com/tj/node-github-url-from-git
https://github.com/robertkowalski/github-url-from-username-repo

And npm go to work, may be it will useful for somebody

@Joeldk

This comment has been minimized.

Copy link

commented Dec 28, 2015

Thank you @surger. Worked for us.

@flouc001

This comment has been minimized.

Copy link

commented Feb 8, 2016

@chrilith thanks for your comment, just hit this issue and indeed it was residual files under the "Program Files/nodejs" directory causing the issue.

@Jameskmonger

This comment has been minimized.

Copy link

commented Feb 17, 2016

@GregWoods That worked, thanks.

@emazzu

This comment has been minimized.

Copy link

commented Feb 18, 2016

How can I resolve the same problem ???

@emazzu

This comment has been minimized.

Copy link

commented Feb 18, 2016

@Jameskmonger How did you resolve ?

@Jameskmonger

This comment has been minimized.

Copy link

commented Feb 18, 2016

@emazzu

Uninstall
Delete Program Files\NodeJS
Reinstall

@feross

This comment has been minimized.

Copy link
Contributor

commented Mar 24, 2016

This issue still exists when upgrading from Node v4 LTS to Node v5.9.1.

@MylesBorins

This comment has been minimized.

Copy link
Member

commented Mar 24, 2016

@feross I think we should be potentially wiping /usr/local/lib/node_modules/npm or the windows equivalent in the installer...

@iarna

This comment has been minimized.

Copy link
Member

commented Mar 26, 2016

@thealphanerd I agree, if you wipe the bundled npm from the previous version before installing there won't be problems.

@kirkbushell

This comment has been minimized.

Copy link

commented Mar 31, 2016

Doing what @rvagg stated resolved it for me without any issues.

@jnatherley

This comment has been minimized.

Copy link

commented Apr 7, 2016

Currently using 5.0.0 installed via NVM on OSX, I tried deleting node_modules and the one in /usr/lib and reinstalling node, nothing appears to work..

"normalizr": "git://github.com/gaearon/normalizr.git#master",

Error: Cannot resolve module 'normalizr'

Any ideas? Maybe i've done this the wrong way or i'm missing something obvious.

@stevenbeeckman

This comment has been minimized.

Copy link

commented May 24, 2016

Just installed Node 6.2.0 current on Mac OS X:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'install' ]
2 info using npm@3.8.9
3 info using node@v6.2.0
4 verbose stack Error: Cannot find module 'github-url-from-git'
4 verbose stack     at Function.Module._resolveFilename (module.js:440:15)
4 verbose stack     at Function.Module._load (module.js:388:25)
4 verbose stack     at Module.require (module.js:468:17)
4 verbose stack     at require (internal/module.js:20:19)
4 verbose stack     at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js:2:22)
4 verbose stack     at Module._compile (module.js:541:32)
4 verbose stack     at Object.Module._extensions..js (module.js:550:10)
4 verbose stack     at Module.load (module.js:458:32)
4 verbose stack     at tryModuleLoad (module.js:417:12)
4 verbose stack     at Function.Module._load (module.js:409:3)
5 verbose cwd /Users/stevenbeeckman/Documents/startupbus/code/busdaq
6 error Darwin 14.5.0
7 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
8 error node v6.2.0
9 error npm  v3.8.9
10 error code MODULE_NOT_FOUND
11 error Cannot find module 'github-url-from-git'
12 error If you need help, you may report this error at:
12 error     <https://github.com/npm/npm/issues>
13 verbose exit [ 1, true ]

Will try to sudo rm -rf /usr/local/lib/node_modules/npm and reinstall node.

** Update **

Running sudo rm -rf /usr/local/lib/node_modules/npm and then running the Node.js installer again solves this problem.

@angry-birdman

This comment has been minimized.

Copy link

commented Jun 1, 2016

Thank you @stevenbeeckman

Running sudo rm -rf /usr/local/lib/node_modules/npm and then running the Node.js installer again solves this problem.

works

@luckynkala

This comment has been minimized.

Copy link

commented Nov 3, 2016

@GregWoods thanks the below worked for me..
Uninstall
Manually delete residual Program Files/Nodejs folder
Reinstall

@praveen262k

This comment has been minimized.

Copy link

commented Dec 28, 2016

For me npm clean cache did the trick

@watilde watilde referenced this issue Jan 5, 2017
0 of 6 tasks complete
@Simcat Simcat referenced this issue Jan 23, 2017
0 of 3 tasks complete
@herebebeasties

This comment has been minimized.

Copy link

commented Apr 20, 2017

See npm/npm#14026 which is the same as this. IMO this bug should be reopened as this is really a Node installer issue, surely (it should remove any existing files before writing new ones).

@jcicero518

This comment has been minimized.

Copy link

commented Aug 1, 2017

This is still an issue with v6.11.1 on Mac OSX. I get the "Cannot find module 'github-url-from-git'" error when attempting to do anything with NPM.

I removed /usr/local/lib/npm and ran the installer again, which fixed it. I second re-opening this issue. I was able to solve it quickly (with the help of people here) but there's clearly an issue with the installer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.