-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
make test-npm in LTS (4.4.3) #6220
Comments
CC @zkat |
@richardlau this is my bad. It looks like it is the result of the recent upgrade to npm v2.15.1 This is now fixed in Thank you for pointing this out! |
it is worth mentioning that |
@thealphanerd Nope, still fails for me with |
|
Are you running make install first? I believe that v4 npm tests use system
npm
|
Is this documented anywhere? |
(No I wasn't running make install first, there wasn't anything suggesting I needed to do that) |
There was earlier issues with this: and I believe we were trying to ensure it could continue to run without having to install node globally |
I've sent a PR to update the docs |
Reopening for discussion as to whether it should required a global install |
From my perspective requiring a global install is not that friendly. I'd want people to be able to easily run the tests without having to affect their environment outside of the tree they are compiling Node in. And there was some prior agreement on that so we should discuss. |
There's not much to discuss here. That is the state of things in npm 2 and fixing it isn't super trivial iirc. Besides, most people aren't going to be running those tests, and we're adding a doc note about it. |
Note that this works as expected on master with npm 3. |
@mhdawson #1926 was never backported to v4.x So here is package.json for npm in v4.4.1 which we are aware of working in CI Line 193 in 5368455
as you can see it calls to npm expecting it in the path. Nothing has changed here between v4.4.1 and v4.4.3 Alternatively on master we can see that npm 3 is a bit smarter about setting up the env https://github.com/nodejs/node/blob/master/deps/npm/package.json#L210 |
Ok so I can understand "its already fixed in later versions" and was always broken in post 0.12.X so we won't fix the versions in the middle. In that case I expect Richard's problem is unrelated to have to do the global install as the tests were running ok until 4.4.2 |
Iirc even with our tools fix, npm will create child processes on a global node. (Note: I may be incorrect on that, and anyone is welcome to investigate!) |
@Fishrock123 As of npm/npm#11204, npm will spawn its script child processes with the Node.js version it was invoked with by adding the directory in which |
@addaleax so if I read your statement correctly if the npm in the build tree was used then the child processes would be as well, right ? |
@mhdawson I think so, yes. I’m definitely not an expert for the Node core side of npm testing, but the corresponding line to that change is there in |
make test-npm
appears to be broken in LTS (v4.4.3):I saw #6150 contains a patch to remove the call to
test-legacy
, so I've applied that patch and now get a different error:This looks like the test is looking for
npm
-- Presumably themakefile
ortools/test-npm.sh
should be addingnpm
to the path?I've tried adding
test-npm/bin
to myPATH
, which results in yet another error:This looks like
test-npm/bin/npm
is incorrectly resolvingnpm-cli.js
-- I thinktest-npm/bin/npm
is written for an installed Node (i.e. expecting npm to live under anode_modules
directory) and not the copy made for the test.The text was updated successfully, but these errors were encountered: