Since upgrading to MacOS 12 / Monterey I encounter an error, when trying to run my application in Development mode.
To verify the problem, I created a completely new Starter App from start.vaadin.com. I used JDK 11 and Vaadin 21 as that is what my other projects use.
I am using IntelliJ Ultimate for development
When I try to start my project from within IntelliJ as I've done this multiple times before, the project starts, begins to compile the frontend as usual, is writing "Frontend compiled successfully" and then fails with the following message
2021-11-05 08:29:09.589 ERROR 11463 --- [ webpack] c.v.base.devserver.DevModeHandlerImpl : Error when reading manifest.json from webpack-dev-server
java.net.ConnectException: Connection refused
at java.base/sun.nio.ch.Net.pollConnect(Native Method) ~[na:na]
at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:669) ~[na:na]
at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:542) ~[na:na]
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:597) ~[na:na]
at java.base/java.net.Socket.connect(Socket.java:645) ~[na:na]
at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:177) ~[na:na]
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:497) ~[na:na]
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:600) ~[na:na]
at java.base/sun.net.www.http.HttpClient.<init>(HttpClient.java:246) ~[na:na]
at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:351) ~[na:na]
at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:372) ~[na:na]
at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1299) ~[na:na]
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1232) ~[na:na]
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1120) ~[na:na]
at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1051) ~[na:na]
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1653) ~[na:na]
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1577) ~[na:na]
at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527) ~[na:na]
at com.vaadin.base.devserver.DevModeHandlerImpl.readManifestPaths(DevModeHandlerImpl.java:556) ~[vaadin-dev-server-8.0.3.jar:na]
at com.vaadin.base.devserver.DevModeHandlerImpl.processLine(DevModeHandlerImpl.java:492) ~[vaadin-dev-server-8.0.3.jar:na]
at com.vaadin.base.devserver.DevModeHandlerImpl.readLinesLoop(DevModeHandlerImpl.java:457) ~[vaadin-dev-server-8.0.3.jar:na]
at com.vaadin.base.devserver.DevModeHandlerImpl.lambda$logStream$2(DevModeHandlerImpl.java:428) ~[vaadin-dev-server-8.0.3.jar:na]
at java.base/java.lang.Thread.run(Thread.java:831) ~[na:na]
and I can't access the webpage. When starting in production mode from the command line everything is working fine.
Can anyone provide me with some pointers what is going wrong here?
If you are using Node 17, then you are hitting this issue https://github.com/vaadin/flow/issues/12246 and the solution is to use Node 16 instead
Same here but on MacOS Catalina (doesn't think this depends on MacOS version). I've detect that problem while build and run the Vaadin starter app from Eclipse, which didn't work. I don't know which node version is picked up by Eclipse. I've set 16 as default via nvm alias default 16
but no luck. If one use the command line, with such tools like nvm we can fine grained tune the node setup. Here my results:
Vaadin: 21.0.3 Node: 16.13.0 ✅
Vaadin: 21.0.4 Node: 16.13.10 ✅
Vaadin: 21.0.4 Node: 17.1.0 ❌
my nvm ls
results in:
>nvm ls
-> v16.13.0
v17.1.0
system
default -> 16 (-> v16.13.0)
node -> stable (-> v17.1.0) (default)
stable -> 17.1 (-> v17.1.0) (default)
iojs -> N/A (default)
unstable -> N/A (default)
lts/* -> lts/gallium (-> v16.13.0)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.24.1 (-> N/A)
lts/erbium -> v12.22.7 (-> N/A)
lts/fermium -> v14.18.1 (-> N/A)
lts/gallium -> v16.13.0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With