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

webpack-dev-server crashes on v4.0.0-beta.1 - move overlay option into client option #54

Closed
iuscare opened this issue Mar 24, 2021 · 3 comments
Labels

Comments

@iuscare
Copy link

iuscare commented Mar 24, 2021

Describe the bug

When installing the latest version of the package no files are being injected into the templates when running locally. Could be a problem with nodemon/webpack, the output is as follows:

...
webpack_1     | [nodemon] 2.0.7
webpack_1     | [nodemon] to restart at any time, enter 'rs'
webpack_1     | [nodemon] watching path(s): webpack.dev.js webpack-configs/**/* webpack-settings/**/*
webpack_1     | [nodemon] watching extensions: js,mjs,json
webpack_1     | [nodemon] starting `webpack serve --config webpack.dev.js`
webpack_1     | [webpack-cli] Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
webpack_1     |  - configuration has an unknown property 'overlay'. These properties are valid:
webpack_1     |    object { bonjour?, client?, compress?, dev?, firewall?, headers?, historyApiFallback?, host?, hot?, http2?, https?, injectClient?, injectHot?, liveReload?, onAfterSetupMiddleware?, onBeforeSetupMiddleware?, onListening?, open?, openPage?, port?, proxy?, public?, setupExitSignals?, static?, stdin?, transportMode?, useLocalIp? }
webpack_1     | [nodemon] app crashed - waiting for file changes before starting...
...

The site itself is reachable, but no assets are being injected. I am also unable to reach the manifest.json with the browser. Is this a bug or am I missing something fundamental?

To reproduce

Steps to reproduce the behaviour:

  1. composer create-project nystudio107/craft craft3 --no-install
  2. cd craft3
  3. make dev

Expected behaviour

The js bundles should be injected into the templates with HMR in place.

Screenshots

Bildschirmfoto 2021-03-24 um 11 51 56

@iuscare iuscare added the bug label Mar 24, 2021
@khalwat
Copy link
Contributor

khalwat commented Mar 24, 2021

The issue here isn't Nodemon, it's webpack-dev-server -- can you check your package.lock and see what version of that is installed?

@khalwat
Copy link
Contributor

khalwat commented Mar 24, 2021

Okay yep it's as expected, they changed the config in the latest beta.1 release of webpack-dev-server:

https://github.com/webpack/webpack-dev-server/releases/tag/v4.0.0-beta.1

I'll fix it.

@iuscare
Copy link
Author

iuscare commented Mar 24, 2021

Ah, sorry for being a little bit slow. Can confirm that I am running on 4.0.0-beta.1 and in that case moving the overlay prop into the client object solves it for me.

@iuscare iuscare changed the title Nodemon crashes on the latest version with a blank setup webpack-dev-server crashes on v4.0.0-beta.1 - move overlay option into client option Mar 24, 2021
khalwat pushed a commit that referenced this issue Mar 24, 2021
…by moving the `overlay` config setting to `client` (#54)
@khalwat khalwat closed this as completed Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants