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

npm prune removes napa packages #22

Open
kud opened this issue Sep 17, 2014 · 6 comments
Open

npm prune removes napa packages #22

kud opened this issue Sep 17, 2014 · 6 comments
Milestone

Comments

@kud
Copy link

kud commented Sep 17, 2014

When you do npm prune, it removes packages installed by napa. It's a nonsense as it's defined in napa key in package.json.

It sounds logical though about npm but a fix should be done.

What do you think?

@shama
Copy link
Owner

shama commented Sep 17, 2014

I'm not sure how I could fix it as I can't make npm prune aware of my library. Any ideas?

@kud
Copy link
Author

kud commented Sep 17, 2014

We could give a alias to the user to override prune or create another script with prune-with-napa.

@shama
Copy link
Owner

shama commented Sep 17, 2014

Hmm interesting. I wonder if we'd be opening pandora's box by beginning to wrap npm commands to be napa aware? napa prune? Or really napa xxxx just aliases down to the npm command and does special handling for the commands it needs to. Hmm...

@kud
Copy link
Author

kud commented Sep 17, 2014

The thing is it's not a prune on napa, it's just to make npm aware there're napa packages.

@shama
Copy link
Owner

shama commented Oct 14, 2014

It looks like if you add the package to bundledDependencies it will not prune the package. For example:

"bundledDependencies": [
  "ember", "handlebars", "jquery"
]

So maybe when installing, napa should add the packages to that key to help with this flow?

@caseyWebb caseyWebb added this to the 3.0.0 milestone Oct 29, 2015
@caseyWebb caseyWebb self-assigned this Oct 29, 2015
@caseyWebb caseyWebb removed their assignment Mar 28, 2017
@ajbogh
Copy link

ajbogh commented Sep 3, 2018

The bundledDependencies solution didn't work for me, and, with this change, attempting to uninstall a package after npm had removed the extra folders caused npm to give the warning:

npm ERR! code E404
npm ERR! 404 Not Found: sphinxbase@*

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