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

Fix: Fixes a warning in utils-worker package for missing vm module #5750

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

vidorteg
Copy link
Member

@vidorteg vidorteg commented Mar 15, 2024

Pull request checklist

Make sure you:

For non-trivial changes, please make sure you also:

  • Added/Updated related documentation.
  • Added/Updated related tests.

Short description of the change(s)

Recent builds have a warning when running the tests about a missing dependency that was used to be fullfilled

WARNING in ../../node_modules/asn1.js/lib/asn1/api.js 21:12-42
Module not found: Error: Can't resolve 'vm' in '/home/vidorteg/vidorteg-webhint/node_modules/asn1.js/lib/asn1'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "vm": require.resolve("vm-browserify") }'
        - install 'vm-browserify'
If you don't want to include a polyfill, you can use an empty module like this:

So applying the suggested fix

@vidorteg vidorteg marked this pull request as ready for review March 18, 2024 17:32
@vidorteg vidorteg merged commit 8338856 into webhintio:main Mar 18, 2024
5 checks passed
@vidorteg vidorteg deleted the vidal/fix-browserify-warn branch March 18, 2024 17:33
@vidorteg vidorteg requested a review from molant as a code owner March 18, 2024 17:35
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.

1 participant