Odd behaviour when installing a repo

(Antonio Laguna) #1

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.

0 Likes

(Lars Willighagen) #2

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.

1 Like

(Antonio Laguna) #3

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

0 Likes

(system) closed #4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

0 Likes