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

Trouble installing a dependency that uses napa #69

Open
RichardMarks opened this issue May 3, 2016 · 7 comments
Open

Trouble installing a dependency that uses napa #69

RichardMarks opened this issue May 3, 2016 · 7 comments

Comments

@RichardMarks
Copy link

I have a two projects, A and B for brevity.

project A uses napa to install dependencies from github

project B installs project A as a dependency

the install fails if project B does not have napa installed as well, which means that project B needs to "know" about project A's dependency on napa in order to use it.

Is there a way to resolve this?

@shama
Copy link
Owner

shama commented May 3, 2016

The names of the actual projects would help. napa doesn't do anything fancy, it just git clones a repo. So if project A uses napa then it should have napa in it's install script or include the napa installed package in the published package.

@RichardMarks
Copy link
Author

Both projects A and B are locally developed, their names are not relevant in this case.

In the package.json for project A, there is a script hook "postinstall": "napa"
and a "napa" section where I bring in my dependencies.

I then locally publish project A as an npm module using npm link

and then in the package.json for project B, I install my local npm module.

When that hits the "postinstall" script, project B fails to install project A, because it cannot find napa.

If I npm install napa in the project B directory, then project A will install into project B.

I do not want project B to have to know that it needs napa in order for project A to be installed.

@shama
Copy link
Owner

shama commented May 3, 2016

When that hits the "postinstall" script, project B fails to install project A, because it cannot find napa.

Is napa a dependency? If your package requires another to install, it will need to be a dependency of that project.

@linkabi9
Copy link

@RichardMarks did you get this resolved? I want to do something similar and I'm wondering if I should avoid it. Did adding napa to the dependencies block of the Package A help?

@RichardMarks
Copy link
Author

@linkabi9 No, I did not get this resolved, and no adding napa as a dependency does not help either.

@shama
Copy link
Owner

shama commented May 11, 2016

@linkabi9
Copy link

great, i'll be able to use this while i build some in house front end widgets with pre-npm external dependencies. thanks!

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

3 participants