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

Warn Load nom builtin configs failed. #5518

Closed
maclong9 opened this issue Oct 18, 2022 · 13 comments · Fixed by #5521
Closed

Warn Load nom builtin configs failed. #5518

maclong9 opened this issue Oct 18, 2022 · 13 comments · Fixed by #5521

Comments

@maclong9
Copy link

pnpm version: 7.13.5

Code to reproduce the issue: pnpm i

Expected behavior: pnpm installs dependencies without any errors.

Actual behavior: receive following warning:

 WARN  Load npm builtin configs failed, you can use "pnpm config ls" to show builtin configs. And then use "pnpm config --global set <key> <value>" to migrate configs from builtin to global.

Additional information:

  • pnpm config ls prints:
; "builtin" config from /Users/mac/.local/opt/brew/lib/node_modules/npm/npmrc

prefix = "/Users/mac/.local/opt/brew" 

; node bin location = /Users/mac/.local/opt/brew/Cellar/node/18.11.0/bin/node
; node version = v18.11.0
; npm local prefix = /Users/mac/Developer/learning/typescript-course
; npm version = 8.19.2
; cwd = /Users/mac/Developer/learning/typescript-course
; HOME = /Users/mac
; Run `npm config ls -l` to show all defaults.
  • Windows, macOS, or Linux?: macOS
@zkochan
Copy link
Member

zkochan commented Oct 18, 2022

It was caused by this change: pnpm/npm-conf#7

I am not sure how to properly fix it as it looks like an issue when pnpm is installed with brew on macOS. I don't have a mac to test it. Help would be appreciated.

@maclong9
Copy link
Author

I did install pnpm via brew so this does make sense. A fix would be wonderful, not sure which key value to change.

@hyrious
Copy link

hyrious commented Oct 19, 2022

I'm facing the same issue while my pnpm is not installed by brew, it is installed by corepack. Locations are as follows:

$ l $(which npm)
/usr/local/bin/npm ⇒ ../lib/node_modules/npm/bin/npm-cli.js

$ l $(which pnpm)
/usr/local/bin/pnpm ⇒ ../lib/node_modules/corepack/dist/pnpm.js
which runs ~/.cache/node/corepack/pnpm/7.13.5/dist/pnpm.cjs

The problem is that one cannot resolve /usr/local/lib/node_modules/npm from ~/.cache/node/corepack/pnpm.

@lvqq
Copy link
Member

lvqq commented Oct 19, 2022

Well, the previous issue is #5404. Once npm builtin config cannot be resolved, the warning appears. But with npm installed via brew in macOS ARM there exists a prefix error which will crash pnpm, that's the reason why I add the warning.

Maybe I need to distinguish between abnormal and normal cases but it's not easy. Another solution is find a right way to locate npm. Then we don't need this warning.

@maclong9
Copy link
Author

That is a little frustrating, I'm not sure what to suggest. Luckily other than the warning being a little annoying functionality is completely seamless.

@lvqq
Copy link
Member

lvqq commented Oct 19, 2022

Maybe we can remove the above warning, and add more tips about it while prefix error occurs?

ERROR  Unable to find the global bin directory
Run "pnpm setup" to create it automatically, or set the global-bin-dir setting, or the PNPM_HOME env variable. The global bin directory should be in the PATH.

I think it won't be annoying to add some message after the existing error.

@zkochan
Copy link
Member

zkochan commented Oct 19, 2022

Probably we should remove the warning. Maybe we can add a new command for issues like this. For instance, pnpm doctor would print this issue.

@lvqq
Copy link
Member

lvqq commented Oct 19, 2022

That sounds good. I'd like to work on implementing it.

@zkochan
Copy link
Member

zkochan commented Oct 19, 2022

Ok

@maclong9
Copy link
Author

Sounds like a good fix! As it doesn't hinder functionality as far as I can tell... Not run into any issues using it so far anyway.

@chandantiwari1
Copy link

how can i fix this warning on my ubuntu system.
what changes should i made to fix this

@valerii15298
Copy link

I am on windows and having the same issue

@zkochan
Copy link
Member

zkochan commented Oct 25, 2022

The warning is not printed anymore in the latest pnpm version.

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

Successfully merging a pull request may close this issue.

6 participants