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

Update microbundle #2

Closed
wants to merge 1 commit into from
Closed

Update microbundle #2

wants to merge 1 commit into from

Conversation

RudeySH
Copy link

@RudeySH RudeySH commented Oct 24, 2021

Older versions of microbundle are causing issues with npm 7+.

I'm using colorthief and I wasn't able to get npm 7 or 8 working without explicitly installing microbundle as a devDependency.

@RudeySH
Copy link
Author

RudeySH commented Oct 25, 2021

To add more context to this PR, there's a npm "feature" that kicks in because colorthief has a github:lokesh/quantize dependency. Apparently, git/url based dependencies will cause npm 7+ to install devDependencies to rebuild the dependency package. This is a problem when those devDependencies require additional development tools to be installed. The older versions of microbundle did this, but the newer versions don't.

See npm/cli#2784.

@RudeySH
Copy link
Author

RudeySH commented Oct 25, 2021

Merging this PR will provide a workaround for lokesh/color-thief#206 and possibly fix lokesh/color-thief#202.

@nirajsharma99
Copy link

Hey @RudeySH any update on this?, how can we make this work? :(

@RudeySH
Copy link
Author

RudeySH commented Oct 28, 2022

Hey @RudeySH any update on this?, how can we make this work? :(

There are numerous workarounds you can try:

  1. Downgrade to color-thief@2.2.0
  2. Downgrade to npm 7.0.8 or lower
  3. Install microbundle (0.14.1+) as a devDependency in your own package.json
  4. Use overrides in your package.json (npm 8.3.0+), like so:
"overrides": {
  "quantize": "github:RudeySH/quantize"
}
  1. Use @pioug's monorepo: https://github.com/pioug/colorsuite

@RudeySH RudeySH changed the title chore: update microbundle Update microbundle Oct 28, 2022
@lokesh
Copy link
Owner

lokesh commented Mar 1, 2023

Sorry about that. I resolved this by publishing this lib to the npm registry and updating the dep refs in the colorthief package to point to it:
https://www.npmjs.com/package/@lokesh.dhakar/quantize

I also went ahead and updated microbundle:
ceca302

@lokesh lokesh closed this Mar 1, 2023
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 this pull request may close these issues.

3 participants