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

ERR undefined with v3.0.1 when running on Windows 10 #128

Open
nathanhleung opened this issue Jan 29, 2021 · 5 comments
Open

ERR undefined with v3.0.1 when running on Windows 10 #128

nathanhleung opened this issue Jan 29, 2021 · 5 comments

Comments

@nathanhleung
Copy link
Owner

From @kirlat:

Thanks @nathanhleung for providing a fix! v3.0.1, still does not work for me, but the output is different this time.

I'm using install-peerdeps with npx on Win10, and here is how I'm running it:
npx install-peerdeps alpheios-node-build --dev --only-peers
and the output in my case is
ERR undefined.

That's different from v3.0.0 where the output is ERR spawn npm ENOENT so things have changed since then.

If I run it as npx install-peerdeps@v2.0.2 alpheios-node-build --dev --only-peers it works without a hitch.

My node version is 14.8.0 and npm is 6.14.7.

I will try to test it in different scenarios (maybe installed locally) to get more info on this. Not sure what's the best way to diagnose the issue.

@nathanhleung
Copy link
Owner Author

From @karlhorky:

@kirlat what does it show you if you run this command? (using the --dry-run flag to show the command that install-peerdeps will run internally)

npx install-peerdeps alpheios-node-build --dev --only-peers --dry-run

In addition, were there any NPM error log files created? Could you paste those logs here if so?

@karlhorky
Copy link

Maybe it was caused by fa0b30e (#126), as discussed here: #126 (comment)

@kirlat
Copy link

kirlat commented Jan 29, 2021

If I execute npx install-peerdeps alpheios-node-build --dev --only-peers --dry-run (it runs version 3.0.3) it outputs the following

install-peerdeps v3.0.3
ERR undefined

the same output is produced for v3.0.2 except the different version in the output.

I can't find where logs for npx are, they are not in any obvious places, will try to it figure out.

If I'm installing the install-peerdeps globally (with npm i -g) I'm getting the same error output.

@kirlat
Copy link

kirlat commented Jan 29, 2021

I've checked the logs and the problem seems to be that the package whose dependencies to be installed, alpheios-node-build, is not in the npm registry. It is installed locally (i.e. exist in ./node_modules/alpheios-node_build) and this seems to cause the issue:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'info',
1 verbose cli   'alpheios-node-build@latest',
1 verbose cli   '--json'
1 verbose cli ]
2 info using npm@6.14.7
3 info using node@v14.8.0
4 verbose npm-session d488d407d2f19391
5 http fetch GET 404 https://registry.npmjs.org/alpheios-node-build 339ms
6 verbose stack Error: 404 Not Found - GET https://registry.npmjs.org/alpheios-node-build - Not found
6 verbose stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-fetch\check-response.js:114:15
6 verbose stack     at processTicksAndRejections (internal/process/task_queues.js:93:5)
7 verbose statusCode 404
8 verbose pkgid alpheios-node-build@latest
9 verbose cwd C:\uds\projects\alpheios\alpheios-core
10 verbose Windows_NT 10.0.19042
11 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "info" "alpheios-node-build@latest" "--json"
12 verbose node v14.8.0
13 verbose npm  v6.14.7
14 error code E404
15 error 404 'alpheios-node-build' is not in the npm registry.
15 error 404 You should bug the author to publish it
15 error 404 (or use the name yourself!)
15 error 404
15 error 404 Note that you can also install from a
15 error 404 tarball, folder, http url, or git url.
16 error 404
17 error 404 'alpheios-node-build@latest' is not in the npm registry.
18 error 404 You should bug the author to publish it (or use the name yourself!)
19 error 404 Note that you can also install from a
20 error 404 tarball, folder, http url, or git url.
21 verbose exit [ 1, true ]

This, however works with v2.0.2, npx install-peerdeps@v2.0.2 alpheios-node-build --dev --only-peers gets the dependencies installed.

Another thing I've noticed. If to remove the package whose dependencies need to be installed (i.e. alpheios-node-build) and run v2.0.2 (npx install-peerdeps@v2.0.2 alpheios-node-build --dev --only-peers) it recognizes the fact that the package is missing and provides the relevant error message:
ERR That package doesn't exist. Did you mean to specify a custom registry?

v3.0.3, however, just prints ERR undefined in this case.

If to run v3.0..3 against the package that IS in the registry (npx install-peerdeps eslint-config-airbnb --dev --only-peers ), it works fine.

So probably something was changed around how locally installed packages are handled.

@karlhorky
Copy link

Seems like #228, #193 and #150 are also related to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants