question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

src/ directory is excluded when npm install-ing

See original GitHub issue

When I run npm install gulp-sourcemaps it pulls in the package, but only index.js. The src/ directory is missing and given that index.js essentially just requires ./src/init and ./src/write, breaks.

Why is the src/ repository not included in installs? I can’t see an .npmignore file in the repository, so is the src/ directory being excluded from installs by some other method? (Forgive me as I’m not a Node.js developer!)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:14
  • Comments:16

github_iconTop GitHub Comments

1reaction
nmccreadycommented, Oct 13, 2016

My bad and to help your apps in the future npm shrinkwrap is your friend.

1reaction
martinbeancommented, Oct 13, 2016

Indeed. There’s a lot of angry Laravel developers who can’t gulp right now 😛

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is there no src folder in the npm install package? #44
well, the src is not included, because it is common practice to only distribute the builded dist files. If you take a look...
Read more >
npm, avoid publishing of src dir without using .npmignore
The pertinent hooks are: prepublishOnly : Run BEFORE the package is prepared and packed, ONLY on npm publish ... postpublish : Run AFTER...
Read more >
How to ignore files from your npm package | Zell Liew
First, npm will check your repository for a .gitignore file. If there is a .gitignore file, npm will ignore files according to what's...
Read more >
Including and excluding files from deployment - Claudia.js
Run npm pack on the project folder to simulate NPM packaging without deploying to AWS. If some source files are missing or there...
Read more >
What Really Gets Packaged?. Including and excluding files in ...
To explicitly specify which files you'd like to be included in the npm package, you can use the files field in the package.json...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found