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

Index.js file missing from published packages #20

Open
alulsh opened this issue Apr 29, 2016 · 5 comments
Open

Index.js file missing from published packages #20

alulsh opened this issue Apr 29, 2016 · 5 comments

Comments

@alulsh
Copy link
Member

alulsh commented Apr 29, 2016

Yesterday I used the latest version of npm-internal (d73792e) to publish a package.

I ran into a weird issue where my package would install but could not be required in another module.

Working with @ianshward, we noticed that the index.js file was missing from the published package, causing it to install successfully but fail on require(). This happened despite index.js being in the repo - it had been neither deleted nor modified as part of my commits for that package.

I was able to get around the issue by using 5cb9c23 and re-publishing the package. The index.js file appeared in my package again. Now the package can be require successfully.

/cc @mapbox/devops

@freenerd
Copy link
Contributor

freenerd commented May 2, 2016

Looks like the only change that happened between the two versions you used is d73792e which changes the url on S3 and have no side-effects on included files when using the --dev flag.

@alulsh do you have a reproduceable test case? Could this be related to node/npm versions? Did you switch these between running the different npm-internal commits?

@alulsh
Copy link
Member Author

alulsh commented May 2, 2016

@freenerd - last Friday I did experience the same missing index.js file issue with the 5cb9c23 version of npm-internal. So it appears not to be related to the version of npm-internal. I do use nvm and frequently change between different Node versions so I agree with you this could be related to node/npm versions.

I haven't found a way to reproduce this - I can set aside some time to try with different versions of node and npm and determine which ones are affected.

@freenerd
Copy link
Contributor

freenerd commented May 3, 2016

I can set aside some time to try with different versions of node and npm and determine which ones are affected.

This might not be worth investing effort if it's the result of some edge-case configuration mishap. I think if you find this problem again by accident, then it's worth capturing the state and try to reproduce.

@sindresorhus
Copy link

This is a known bug in npm, see: npm/npm#5082

@SamVerschueren
Copy link

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