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

[BUG] npm install --link should respect the save options (imho) #1296

Closed
richardeschloss opened this issue May 14, 2020 · 1 comment
Closed
Labels
Bug thing that needs fixing

Comments

@richardeschloss
Copy link

richardeschloss commented May 14, 2020

What / Why

Hi, I appreciate all the work you've done up to this point. I think it would really improve my workflow if "npm install --link" respected the save options. I really love npm install --link. However, it wasn't respecting my save options. When I develop locally, I prefer to install to the global folder and then just link to that. However, when I push to CI/CD systems, it's easier for those systems to simply "npm install" and just consume whatever deps are listed in the package.json. Other times, I have a scaffolded project, where it will consistently use the same deps; for example a Vue project with linters and test framework. It's super easy for me to re-use those package.json files and run npm install --link to install link to the deps in the new project.

Question: will arborist be essentially solving this issue in v7?

Possible solution in the works, that I may agree with: https://github.com/npm/rfcs/blob/latest/accepted/0011-npm-link-changes.md
--> If this instead lands in v7, then that makes my open issue closed and unneeded..

When

  • 05/2010

Where

  • Local machine

How

Current Behavior

npm install --link

Installs whatever is listed in package.json as deps and devDeps into the global folder, and then links to that. That's cool! But, consider the next case:

npm install --link ava

Installs ava into the global folder but...doesn't update package.json :(. This means if I wanted to share the package.json file with a CI / CD sytem and have it "npm install", it will install the deps in package.json, but it will never install ava.

Steps to Reproduce

npm install -D --link [some package]

Expected Behavior

  • In the steps above, when I use "-D", I want the package to be saved to devDependencies because that's kinda the deal that was promised by the manual

Who

  • n/a

References

  • I didn't just want to report the issue...with good intentions, I submitted PR Respects the save options for npm --link #1295. This does exactly what I want it to do but for some reason I can't get the CI system to get passed node . install, even though that works on my local machine.
@darcyclarke
Copy link
Contributor

npm v6 is no longer in active development; We will continue to push security releases to v6 at our team's discretion as-per our Support Policy.

If your bug is reproducible on v7, please re-file this issue using our new issue template.

If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo

Closing: This is an automated message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing
Projects
None yet
Development

No branches or pull requests

2 participants