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

Packages installed with napa removed after install other package #81

Open
Anonym-tsk opened this issue Dec 14, 2017 · 5 comments
Open

Comments

@Anonym-tsk
Copy link

I have in my package.json

"napa": {
  "foo": "author/foo#branch"
},
"scripts": {
  "install": "napa"
},
"devDependencies": {
  "napa": "^3.0.0"
}

When i do npm i, napa creates node_modules/foo with my module.
But when i do npm i -D other-package, directory node_modules/foo will be removed.
What i do wrong?

@caseyWebb
Copy link
Collaborator

As far as I know, the only solution is to re-run npm install after adding the dependency. Installing a single dep does not trigger any package.json run scripts.

@ajbogh
Copy link

ajbogh commented Sep 3, 2018

I have a PR that might solve this issue by allowing you to specify a different folder for napa dependencies, such as vendor. See #84.

@JakedUp
Copy link

JakedUp commented Mar 29, 2019

Why not just have Napa build a package.json for said library so that it does not get scrubbed?

@caseyWebb
Copy link
Collaborator

@JakedUp napa already builds and writes a package.json to the file system. If you're suggesting automatically publishing to npm, I think that's way out of the scope of this package.

@JakedUp
Copy link

JakedUp commented Mar 29, 2019

Ah, ok -- I did not know this. Thanks for the clarification

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