-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Does not return the correct absolute path #20
Comments
That would be great, but first, let's get more info about your setup. What OS/version are you on? etc. |
I'm on macOS Sierra 10.12.6. I already told you about the Node and npm version I'm using. The package npm-check which prompted the error is installed globally on my system. I think I should take a look at the code of the ini package. |
hmm, that answered my main question. I think your suggestion about looking into Was there any more information in the error message you could share? can you get a stack trace? |
Of course. It's definitely coming from ini module. I'll dig into the bug this weekend. Should I open an issue on that other repo and ask guidance to the maintainers ? It's my first time trying to contribute to OSS. ➜ npm-check --global --update --debug
|
@jbouhier that's stack trace is helpful, thanks. Will you run the following commands from the command line? node -e "console.log('NODE_PATH:', process.env.NODE_PATH)"
node -e "console.log('HOME:', process.env.HOME)" I see in the code above that if If it's not set, then we can dig deeper by looking at
😀 maybe we'll track down a bug that you can submit a PR for! |
Hey @doowb, here's the output:
Before creating this issue, I tried setting In my ~/.npmrc file I have: I guess I'm on the right track, aren't I ? |
It looks like I'm not sure if resolving environment variables belongs here or in consuming modules, but it seems similar to how Also, does that syntax vary between operating systems? |
I'll have to get back on you after spinning up a few VMs and try it out. |
Debian 9 / kernel 4.9.0-4-amd64
Same result exact error and stack trace with Debugging init module now. |
Ha. Is this still a bug? Probably. It sounds my like a source for the tunnckoCore/get-installed-path#79 issue. |
Hello @olstenlarck, Yes, it might still be. I just commented out |
If this is still a bug, does anyone have a suggested fix or solution I can try? Or a PR? |
Haven't tried again. Gonna take a look again. |
Hello @jonschlinkert,
When I use
npm-check --global --update
, which depends on global-modules and finally global-prefix, I've got an incorrect path error which points to${HOME}/.npm-packages
instead of the actual absolute path.I've done a little bit of digging inside global-prefix and
${HOME}/.npm-packages
seems to be returned fromtryConfigPath(configPath)
. Looks like the value of${HOME}
is not parsed with the actual value.I'm not sure if I should fix this here or if the cause is coming from some other component (i.e: npm-check, node or npm version...).
Here's my config:
Let me know if I can do a PR to fix it 😃
The text was updated successfully, but these errors were encountered: