-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
npm global folder ~/.npm-packages triggers env.modulePath #60
Comments
I'm going to look to @tkellen on the "bug or feature" part. If it's a bug we need to fix, maybe we can use https://www.npmjs.com/package/global-modules or https://www.npmjs.com/package/global-paths - @guybedford could you have the users running into this get the output from those modules so we can see if they report correctly? |
Good to hear from you @phated, and thanks for the quick response. I was unable to replicate this again in my own tests, so please don't spend any time digging into this just yet - will report back with more info when we have looked into it again a bit further. |
If you can replicate this, it's definitely a bug. You might have an easier time isolating it with http://github.com/js-cli/js-hacker |
Thanks, I'm still struggling to get that replication from the original issue, but will keep you posted. |
I still haven't got a replication on this, but a user just posted they are getting this with a NODE_PATH of |
Thanks for the update @guybedford! unfortunately, I still need a viable reproduction of this to investigate :( |
Hey All, I think I'm getting this issue - as JSPM init wouldn't work for me... let me know if I can help to provide details to help diagnose. I'm on Windows 10 - running inside PowerShell console.
the liftoff As a local work-around I hacked JSPM with the following change to get it to resolve the global if (env.modulePath) {
+ if (/^win/.test(process.platform)) {
+ require(path.resolve(env.modulePath, '../node_modules/jspm/cli'));
+ } else {
- require(path.resolve(env.modulePath, '../cli'));
+ require(path.resolve(env.modulePath, '../cli'));
+ }
} haha - I don't know why I did the |
Same issue as jspm-cli#1338 here... My NODE_PATH was set to |
I'm not sure if this is a feature or a bug but it came up in jspm/jspm-cli#1338.
The issue is that when the global npm install folder is a local user path, this is setting
env.modulePath
, which is normally not set when running the global version.Let me know if I'm missing something here but perhaps liftoff can determine if the module is resolving to one of the global folders in https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders and not set
env.modulePath
in these cases?The text was updated successfully, but these errors were encountered: