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

Not suitable for working with a relative dep that has yet to be published? #52

Open
benoitgrelard opened this issue Dec 5, 2022 · 3 comments

Comments

@benoitgrelard
Copy link

Hey @mweststrate, I am wondering if this system is not suitable for working with a relative dep that yet to be published?
I am trying to work on a npm package locally, it hasn't been published yet.
I have linked it to my a local project using relative-deps.
It all seems to work fine, however, the package dependencies aren't installed in the project so it fails at runtime.

Am I doing something wrong or is it because it would normally install the dependencies from the actual dep, hence perhaps why this warning which I hit:

console.warn(`[relative-deps][WARN] The relative dependency '${name}' should also be added as normal- or dev-dependency`)

Thanks!

@PierreKiwi
Copy link

Hello @benoitgrelard,

I am facing the same issue. I am not planning to publish my local package so adding it to dependencies or devDependencies does not work.

Did you find a workaround ?

@vpiskunov
Copy link

vpiskunov commented May 30, 2023

If your package is hosted in a github repository, you can first run npm i githubUserOrOrg/repoName - and optionally add suffix to that path of #branch-name or #commit-id. After that, do npx relative-deps add ../some-relative-path

Further, if you don't have it in github either - simply do npm install ../some-relative-path at first, and then add by npx relative-deps add ../some-relative-path - this way it will already be there first using normal relative filepath install, but relative-deps will overwrite it correctly inside node_modules

@benoitgrelard
Copy link
Author

Thanks @vpiskunov this method actually worked for us in the meantime.

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