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

Doesn't work with scoped modules #8

Open
PMByrne opened this issue Jan 8, 2016 · 5 comments
Open

Doesn't work with scoped modules #8

PMByrne opened this issue Jan 8, 2016 · 5 comments

Comments

@PMByrne
Copy link

PMByrne commented Jan 8, 2016

Pretty easy to reproduce.

Simple install any scoped module and run your module.

The tgz file that is generated will not include the scoped module when the tarball is extracted.

@ghost
Copy link

ghost commented Feb 26, 2016

Thanks, I will look into this

@ghost
Copy link

ghost commented Feb 26, 2016

Looks like this is an npm issue: npm/npm#9175

I will investigate a stop-gap work around.

@lizell
Copy link

lizell commented Dec 8, 2016

A workaround seems like a very good idea. The npm issue appears to have stalled…

@lealgerardo
Copy link

lealgerardo commented May 15, 2017

To get this to work with a scoped module is just a matter of a simple fix on npm-bundle's index.js, on the glob.bind(null, '*') line.

the problem is simply that npm-bundle does not find the package.json directly as child of the first folder in .nmpbundle/node_modules.

In other words without scope you have:

.npmbundle/node_modules/your_package/package.json

With scopes you have:

.npmbundle/node_modules/@scope/your_package/package.json

so glob.bind(null, '*') returns @scope which does not have a package.json inside.

So a general fix should be easy to cook, glob.bind(null, '@*/*') is a simple workaround only for scoped cases.

@BlackGad
Copy link

BlackGad commented Jun 4, 2019

Any progress?

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

4 participants