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.

Latest canary causes Webpack to panic

See original GitHub issue

Bug report

Describe the bug

Hi, I wanted to try out Webpack 5. However, when I start the dev server, webpack panics with an error message:

ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
 - configuration[0].output.environment should be an object:
   object { arrowFunction?, bigIntLiteral?, const?, destructuring?, dynamicImport?, forOf?, module? }
   -> The abilities of the environment where the webpack generated code should run.
 
 ...
 
errors: [
    {
      keyword: 'type',
      dataPath: '[0].output.environment',
      schemaPath: '#/definitions/Environment/type',
      params: [Object],
      message: 'should be object',
      schema: 'object',
      parentSchema: [Object],
      data: 5
    },
    {
      keyword: 'type',
      dataPath: '[1].output.environment',
      schemaPath: '#/definitions/Environment/type',
      params: [Object],
      message: 'should be object',
      schema: 'object',
      parentSchema: [Object],
      data: 5
    }
  ],

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Create a new project
  2. Upgrade next to latest canary
  3. Add latest webpack (5.0.0-beta.30) to resolutions
  4. See error

Codesandbox:

https://codesandbox.io/s/webpack-5-repro-5vvzs (You may need to restart the server to see the errors)

Expected behavior

For magic to happen.

Screenshots

System information

  • OS: macOS, Windows
  • Browser (if applies): Chrome, Firefox Developer Edition
  • Version of Next.js: ^9.5.4-canary.15
  • Version of Node.js: 14.x

Additional context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
ijjkcommented, Sep 14, 2020

Hi, the above PR has been released in v9.5.4-canary.16 of Next.js

1reaction
jensmeindertsmacommented, Sep 14, 2020

The fix has now been merged, I suspect a new canary release will be out soon, so you will be able to use the latest Webpack 5 beta 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unit Testing - Webpack from Nothing
It's absence is felt if we try to access our code. Let's modify our canary test to load our markdown previewer and assert...
Read more >
razzle - npm
Create server-rendered universal JavaScript applications with no configuration. Latest version: 4.2.17, last published: 4 months ago.
Read more >
can't resolve 'fs' webpack 5 | The AI Search Engine You Control
Open links in a new tab ... OS: Windows 10; Version of Next.js: 8.1.1-canary.67 ... This causes webpack to panic and therefore crashes...
Read more >
Webpack: Paths and Naming - Bambielli's Blog
TIL the difference between path and publicPath in webpack, ... I've been doing some prototyping work of our UI against a new version...
Read more >
Kernel Panic due to GPU Acceleration on macs with Intel ...
... in new macbooks with the Intel HD4000 integrated graphics card, for some reason google did not remove GPU acceleration from canary. Kernel...
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