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

workbox-build is droping V8 support in 5.1.1 #2415

Closed
Mister-Hope opened this issue Mar 22, 2020 · 7 comments · Fixed by #2416
Closed

workbox-build is droping V8 support in 5.1.1 #2415

Mister-Hope opened this issue Mar 22, 2020 · 7 comments · Fixed by #2416
Assignees
Labels
Bug An issue with our existing, production codebase. workbox-build

Comments

@Mister-Hope
Copy link

Mister-Hope commented Mar 22, 2020

[email protected] requires strip-comments^2.0.1

while it requires Node >= 10

https://www.npmjs.com/package/strip-comments

workbox-build
The generateSWString mode has been removed. We expect the impact of this to be minimal, as it was primarily used internally by workbox-webpack-plugin.

The minimum required version of node has been increased to v8.0.0. This also applies to build tools that use workbox-build, like workbox-cli and workbox-webpack-plugin.

This issue means all the CI process which requires workbox-build V5 fails on node 8. 😢 I hope you can fix it.

@jeffposnick
Copy link
Contributor

Sorry, that was definitely inadvertent, and is kind of embarrassing since I think this is the second time this has happened with strip-comments.

We do have CI tests set up that use Node v8, but I guess it's not exercising that code path.

We'll cut a new release that rolls back strip-comments and ensure that the code coverage for our CI tests will catch this moving forward.

@jeffposnick jeffposnick self-assigned this Mar 23, 2020
@jeffposnick jeffposnick added Bug An issue with our existing, production codebase. workbox-build labels Mar 23, 2020
@jeffposnick
Copy link
Contributor

So actually, could you tell me how this failure manifested itself? I just tried running the workbox-build code that should use strip-comments in Node v8, and it ran successfully.

I know that strip-comments has node >= 10 listed in its engines metadata, but how were you able to trigger a failure in Node v8?

Again, we'll bump things back in the next release anyway, but I would like to come up with a "failing" test to add to our test suite that will hopefully catch this in the future.

@Mister-Hope
Copy link
Author

Mister-Hope commented Mar 24, 2020

11:03:41 AM: error [email protected]: The engine "node" is incompatible with this module. Expected version ">=10".

https://app.netlify.com/sites/vuepress/deploys/5e77172e94c6e90008aee2c2

Related to vuejs/vuepress#2230

Netlify fails if the module are expecting different node version

@jeffposnick
Copy link
Contributor

Okay, so it looks like yarn is stricter about the engines field than npm is.

(It looks like yarn install --ignore-engines would get this to work, but again, we're going to roll this back to an earlier version of strip-comments.)

@jeffposnick
Copy link
Contributor

It looks like adding in https://docs.npmjs.com/misc/config#engine-strict to our CI's npm installation might give us the same strict checking behavior.

@jeffposnick
Copy link
Contributor

...actually, all our npm installation logic is orchestrated by lerna, and while I think it should be possible to pass through some of those options, I'm not having any luck doing that.

I'm going to address this by just creating a separate set of tests that attempt doing a yarn installation of our node-targeted packages. We tend not to uses yarn so this is probably a good idea anyway to pick up this and any other issues that the yarn community might experience.

@jeffposnick
Copy link
Contributor

This should be fixed by #2416 and the 5.1.2 release that we just pushed out.

Sorry about that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug An issue with our existing, production codebase. workbox-build
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants