question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

workbox-build@6.2.0 not compatible with workbox-webpack-plugin@6.0.2

See original GitHub issue

Library Affected: workbox-webpack-plugin

Browser & Platform: n/a

Issue or Feature Request Description: After 6.2.0 was published yesterday, our project that is constrained to workbox-webpack-plugin: ~6.0.2 started failing with zero changes to our code base. It appears the constraint in this package workbox-build: ^6.0.2 causes an upgrade to 6.2.0, which does not appear to be backward compatible with 6.0.2 of the plugin.

Error: Cannot find module 'workbox-build/build/options/schema/webpack-generate-sw'

Our workaround for now is to fix workbox-build back to 6.0.2 using resolution fixing:

"resolutions": {
    "workbox-build": "~6.0.2"
}

We’ve put out the fire on our end, but I can imagine anyone else using conservative constraints like our project will also run into build failures after yesterday’s release. Please let me know if you have any questions or need additional detail.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:7
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
jeffposnickcommented, Aug 6, 2021

Okay, release v6.2.2 uses the --exact flag, so we should hopefully not run into the same issue in the future.

I’ll leave this issue open to evaluate the impact on developers who are stuck for some reason on a mismatched older version of the Workbox libraries.

1reaction
jeffposnickcommented, Aug 6, 2021

Gotcha. I’ve filed https://github.com/GoogleChrome/workbox/pull/2906 and I’m going to give that change a try soon with a pre-release publish to npm, as it’s really hard to test the actual lerna flow without doing a publish. Assuming that looks as expected, I’ll flag it as latest on npm.

I don’t think that change is going to address the 6.0.2 vs. 6.2.0 compatibility issue retroactively, because 6.2.0 was written with the assumption that all of the mutual dependencies would also use 6.2.0, and it’s not going to be trivial to undo that. But moving forward, for 6.2.1 on, I hope that our dependencies will accurately reflect that intention.

Read more comments on GitHub >

github_iconTop Results From Across the Web

workbox-build@6.2.0 not compatible with ...
0 was published yesterday, our project that is constrained to workbox-webpack-plugin: ~6.0.2 started failing with zero changes to our code base.
Read more >
workbox-webpack-plugin
A plugin for your Webpack build process, helping you generate a manifest of local files that workbox-sw should precache.
Read more >
workbox-webpack-plugin versions and peer dependencies
Online Peer dependency version tool to search for compatible versions of related NPM packages.
Read more >
Migrate from Workbox v2 to v3 - Chrome Developers
A guide to migrating from Workbox v2 to v3.
Read more >
Generate ServiceWorker using workbox 6 - how to import ...
You can run InjectManifest via workbox-webpack-plugin and it will take care of both compiling your service worker (i.e. inlining the ES ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found