Tried with the change to assets/build/webpack.config.watch.js mentioned above and I still get the weird response in my terminal when running yarn run start.
Also my css changes aren’t updated while my files are being watched. Maybe I have to do a reinstall?
Your CSS changes won’t be echoed in terminal the way they were in Sage 8; you should see a note in the actual browser window about “rebuilding” and then the styles should update. Are you also not seeing that?
Thanks for your answer! I’m seeing the “webpack rebuilding” notification in the top right corner when I make a change but it’s not actually reflected on the website I’m building, not even after a hard refresh.
Maybe my settings are wrong? I’m using laravel valet in development.
Uncaught TypeError: __WEBPACK_IMPORTED_MODULE_2__util_Router__[false] is not a constructor
at Object.<anonymous> (main.js:23)
at Object.<anonymous> (main.js:27)
at __webpack_require__ (bootstrap f2d9dd8…:659)
at fn (bootstrap f2d9dd8…:83)
at Object.<anonymous> (tether.js:1811)
at __webpack_require__ (bootstrap f2d9dd8…:659)
at bootstrap f2d9dd8…:708
at bootstrap f2d9dd8…:708
Can you remove your node_modules folder, make sure yarn.lock is the same as what’s on the Sage repo, and re-run yarn?
@ben Just removed node_modules, replaced yarn.lock and re-run yarn.
Got this from yarn at terminal warning Incorrect peer dependency "webpack@^2.1.0-beta.19".
That peer dependency warning is expected. The 404 for the CSS is also expected on a Browsersync session no matter what.
What you’re looking for:
The error I mentioned above
Saving a file (make a styling change) and then doing a manual refresh after BS claims it injected the changes
If you start a BS session and immediately don’t see the __WEBPACK_IMPORTED_MODULE_2__util_Router__[false] is not a constructor error in your console, then I’m assuming your node_modules don’t match up with what is expected from the yarn.lock file
I have just updated the publicPath in assets/webpack.config.watch.js and I can confirm I am receiving the exception warning: Uncaught TypeError: WEBPACK_IMPORTED_MODULE_3__util_Router[false] is not a constructor but it reads differently, in that it says “MODULE_3” . Not sure if this matters, but I could not also get the styling to refresh.
I entered the command "yarn run start"
Edited an SCSS file
Refreshed the window in incognito mode, Browsersync did not refresh.
All very confusing. I realised that I had added the line “assets/styles/**/*.scss” to “assets/watch.json” under “watch”. So I removed that line, relaunched “yarn run start” and the refresh solution works for me now. I take it I was not supposed to add that in the watch section? Just thought I would add a message to help anybody else that is new to the yarn/webpack setup that does the same.
I’m getting exactly the same error, but can’t seem to fix it.
Here are the steps that I have followed:
Updated to beta 2
Removed ‘node_modules’ folder
Run ‘yarn’
Run ‘yarn run start’
Files show up in terminal that have not been changed
BrowserSync see’s changes in assets folder (scss & js) but doesn’t inject new files. I can see it ticking in the top right corner.
I don’t see the error in the console that @ben referenced
Changes do not show up after native browser refresh
I’m not seeing the __WEBPACK_IMPORTED_MODULE_2__util_Router__[false] error. But for me the js/css was 404-ing in BrowserSync because of an eslint error that was not being displayed for some reason. Once i ran yarn build it printed the error for me. Then fixed it and ran yarn start again and all was good.
So seems like eslint errors aren’t getting communicated to browsersync, at least for me.
I’m up and running on Valet + bedrock + Sage Beta 2.
on https://bedrock-sagebeta.dev/ all works fine but on localhost:3000 I have ERR_CONNECTION_CLOSED.
This is my config.json