npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

Odd behaviour when installing a repo

Is there something that would make npm download only 4 files out of 12 files plus 2 dirs from a Github Commit?

Tried to install this:

And then:

Only package, changelog, license, and readme coming down. I’m unsure if this is a bug or a piece of behaviour I didn’t get. Any further info would be appreciated.

When installing a git repo, npm “prepares” the tarball so that it matches the expected npm package as much as possible:

  1. It installs deps + devDeps
  2. It then runs the prepare script
  3. Followed by npm pack

Due to the files field in the package.json only index.* is included in the third step, but those files aren’t in the git repo. Since generated files normally aren’t put in a git repo, npm has that second step, but there’s no prepare script so that won’t matter.

I didn’t know about that. Thanks a lot @larsgw !