Skip to content

Instantly share code, notes, and snippets.

@igeligel
Created July 29, 2020 19:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save igeligel/48822118af4ae4a0ba53a7e912748427 to your computer and use it in GitHub Desktop.
Save igeligel/48822118af4ae4a0ba53a7e912748427 to your computer and use it in GitHub Desktop.
ModuleNotFoundError: Module not found: Error: Can't resolve 'http' in 'E:\programming\getworkrecognized.com\node_modules\validate-vat\lib'
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 these module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add an alias 'resolve.alias: { "http": "stream-http" }'
- install 'stream-http'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.alias: { "http": false }
> Build error occurred
Error: > Build failed because of webpack errors
at build (E:\programming\getworkrecognized.com\node_modules\next\dist\build\index.js:15:918)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment