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

[Require] Requiring global modules with bin files resolves to bin instead of module #60

Open
rohit-gohri opened this issue Oct 30, 2019 · 0 comments
Labels

Comments

@rohit-gohri
Copy link
Contributor

rohit-gohri commented Oct 30, 2019

Using with nvm, Require.resolve('pm2') resolves to:
/home/rohit/.nvm/versions/node/v12.2.0/lib/node_modules/pm2/bin/pm2 which is not the module's main file but the executable bin which doesn't export anything.

Require.resolveGlobal('pm2') resolves correctly to
/home/rohit/.nvm/versions/node/v12.2.0/lib/node_modules/pm2/index.js though.

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

No branches or pull requests

1 participant