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 ci doesn't work with [email protected] #341

Closed
nicojs opened this issue Jul 5, 2024 · 7 comments · Fixed by #342
Closed

Bug: npm ci doesn't work with [email protected] #341

nicojs opened this issue Jul 5, 2024 · 7 comments · Fixed by #342

Comments

@nicojs
Copy link
Contributor

nicojs commented Jul 5, 2024

Strange problem. It seems that npm ci doesn't work with the latest decktape release on linux and windows.

decktape

This is probably a bug npm in combination with the npm-shrinkwrap.json file.

This is my thinking

  • You've used mac os to release decktape
  • npm-shrinkwrap.json includes fsevents, because it is included on mac (and only mac).
  • npm install decktape will install decktape ignoring the fsevents, because I'm installing on linux.
  • npm ci failed because of a bug.

I'll create an issue over at npm.

In the meantime, is there some way to solve this problem?

@nicojs
Copy link
Contributor Author

nicojs commented Jul 5, 2024

Already found the issue at npm side: npm/cli#7622

@nicojs
Copy link
Contributor Author

nicojs commented Jul 5, 2024

This reminded me of open issue #277... opened #342. I think it is time to lose the shrinkwrap file (or remember why it was important 😉)

@astefanutti
Copy link
Owner

I vaguely remember some people were having issues with transitive dependencies installed with different versions from those compatible with Decktape. And at the time the suggested solution had been to publish that shrinkwrap file according to:
https://docs.npmjs.com/cli/v10/configuring-npm/package-lock-json#package-lockjson-vs-npm-shrinkwrapjson. I’m not sure what’s the best practice nowadays.

@nicojs
Copy link
Contributor Author

nicojs commented Jul 7, 2024

Shrinkwrap is not common nowadays. It was the only solution to have any influence on dependencies in the past. Since then we have lockfiles and the ability to override dependencies.

If you feel more comfortable you can make it a breaking change (major version bump). I think that is justified

@astefanutti
Copy link
Owner

Thanks. I think it’s OK from the compatibility perspective. We can release a new minor version and get feedback. It’s still not entirely clear how dependencies would exactly match without the shrinkwrap file when users install decktape. If it turns out users have issues with this, we can releases bug fixes.

@nicojs
Copy link
Contributor Author

nicojs commented Jul 9, 2024

It’s still not entirely clear how dependencies would exactly match without the shrinkwrap file when users install decktape.

They probably won't. You can lock your direct dependency versions (by not specifying a version range, as you're doing), but you don't influence the transient dependencies. However, this is what users expect because this is how the entire node-js ecosystem works. If any issues occur, we always have "overrides" in package.json to help as a workaround.

Are you planning on doing a new minor release soon?

@astefanutti
Copy link
Owner

Are you planning on doing a new minor release soon?

I’m mostly AFK for the next couple of days. I’ll do a release right after that.

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

Successfully merging a pull request may close this issue.

2 participants