-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
HMR won't work in v2 beta3.1 #6334
Comments
Same here. For now I need to pass > parcel watch 'src/styles/main.scss' --dist-dir 'dist/styles' --public-url './'
> foo@4.7.4 dev:scripts
> parcel watch 'src/scripts/main.js' --dist-dir 'dist/scripts'
AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
(0, _assert().default)(typeof address === 'object' && address != null)
at HMRServer.start (foo/node_modules/@parcel/reporter-dev-server/lib/HMRServer.js:69:27)
at Object.report (foo/node_modules/@parcel/reporter-dev-server/lib/ServerReporter.js:106:23)
at ReporterRunner.report (foo/node_modules/@parcel/core/lib/ReporterRunner.js:140:31)
at async Parcel.watch (foo/node_modules/@parcel/core/lib/Parcel.js:571:7)
at async run (foo/node_modules/parcel/lib/cli.js:342:9) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '=='
}
foo/node_modules/@parcel/reporter-dev-server/lib/HMRServer.js:148
this.options.logger.warn({
^
TypeError: Cannot read property 'warn' of undefined
at WebSocketServer.handleSocketError (foo/node_modules/@parcel/reporter-dev-server/lib/HMRServer.js:148:25)
at WebSocketServer.emit (events.js:315:20)
at Server.emit (events.js:315:20)
at emitErrorNT (net.js:1345:8)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
⠸ Building index.js... |
I ran into the same issue with 2.0.0-beta.3.1 and downgraded to 2.0.0-beta.2 (for both |
Can anyone provide a reproduction for that |
For me it was a too low port (<1024 I believe) or permission problem. I used to use which says
but (No error with macOS 10.15, but fails with <=10.14 or Linux) |
Was that the issue for anyone else? If that's the case it doesn't really make sense to me that downgrading to beta 2 would solve it. |
Yes changing ports seem to fix it. Did beta 3 change the default ports or something? |
Not that I am aware of. The default port is still 1234. |
I'm having the same problem with Parcel 2.0.0-rc.0, with errors as described in the current behaviour screenshot above. I did a fresh NPM install, having been using Parcel 2.0.0-nightly.400 for nearly a year.
I tried setting I've now disabled HMR with |
@basher have you tried running parcel as root/admin? |
@danieltroger I just tried... makes no difference. Btw, I use terminal window inside VSCode, so I opened VSCode as Admin. Not sure why I would need to do this as I can install packages, etc, and HMR worked in nightly 400. |
I can reproduce the issue with a minimal test case, but I can also get HMR working with 1 scenario. Clone my Parcel 2 RC0 test repo
Now clone my Storybook HTML test repo
|
🐛 bug report
HMR isn't working since updating to v2 beta 3.1
🎛 Configuration (.babelrc, package.json, cli command)
.babelrc :
package,json :
🤔 Expected Behavior
HMR to work and no errors to appear in the console
😯 Current Behavior
🔦 Context
I just updated my project to use v2 beta3.1 and noticed HMR isn't working and I am getting errors in the console.
💻 Code Sample
https://github.com/Darhagonable/Projectize/tree/parcel-react-ext
🌍 Your Environment
The text was updated successfully, but these errors were encountered: