Startup failure with npm after changing from 14.2.0.beta1 to 14.2.0

I’ve had my vaadin flow app starting up fine with 14.2.0.beta1 for a while now. Today I switched it to 14.2.0 (LTS) and now it fails to start:

11:32:45.386 [main]
 INFO  Visited 128 classes. Took 26 ms.
11:32:45.407 [main]
 INFO  Running `npm install` to resolve and optionally download frontend dependencies. This may take a moment, please stand by...
11:32:45.474 [main]
C:\Users\mcooper\.vaadin\node\node.exe \ 
    C:\Users\mcooper\.vaadin\node\node_modules\npm\bin\npm-cli.js \ 
    --no-update-notifier --no-audit install 

11:32:45.478 [main]
 DEBUG Output of `C:\Users\mcooper\.vaadin\node\node.exe C:\Users\mcooper\.vaadin\node\node_modules\npm\bin\npm-cli.js --no-update-notifier --no-audit install`:
Assertion failed: len < MAX_ENV_VAR_LENGTH, file c:\ws\deps\uv\src\win\util.c, line 1478
11:32:45.780 [main]
 ERROR Command `C:\Users\mcooper\.vaadin\node\node.exe C:\Users\mcooper\.vaadin\node\node_modules\npm\bin\npm-cli.js --no-update-notifier --no-audit install` failed:

11:32:45.780 [main]
 ERROR >>> Dependency ERROR. Check that all required dependencies are deployed in npm repositories.
11:32:45.786 [main]
 DEBUG Could not initialize dev mode handler. One of the node tasks failed
com.vaadin.flow.server.ExecutionFailedException: Npm install has exited with non zero status. Some dependencies are not installed. Check npm command output

I’ve done “gradle vaadinClean” and “gradle prepareFrontend” after the change to 14.2.0.

If I revert back to 14.2.0.beta1 I get the same problem. So I may have to revert my entire eclipse workspace.

When I google for the “len < MAX_ENV_VAR_LENGTH” error I found which looks to indicate some kind of environment limit. The thing is nothing changed in my system or user environment. I literally just changed my dependencies to 14.2.0, rebuilt eclipse dependencies, and then gradle vaadinClean prepareFrontend. So it must be something in 14.2.0 that changed some file that blows up npm now.

Running Eclipse latest on Windows 10.


I have checked the environment variable size when run from eclipse is about 36K which exceeds the apparant 32K limit. Of this my $CLASSPATH is nearly 33k itself. The CLASSPATH is created by eclipse based on the gradle buildship plugin. Not sure how I’m suppose to fix this.


I was able to solve this by changing my GRADLE_USER_HOME from a long path like C:/Users/george/.gradle/host to C:/grhome. This shortened CLASSPATH enough to get me under the 32K limit. Definitely not ideal, but it gets me going again.


I don’t have an answer for this issue as there has been trouble replicating said scenario as seen in [node/npm command line calls fail when CLASSPATH string is long]
(, but would be interested that does this happen also if you change to [pnpm]

Also if you have any insights to give in the ticket they would be appreciated.

  • Mikael

I’m using the com.vaadin gradle plugin and I don’t think it supports pnpm yet. At least I don’t see any means of enabling it.



I checked the plugin and it does have the pnpmEnable property it’s just not added to the README configuration options.
so having

vaadin {
  pnpmEnable = true

should get it to run in pnpm mode.
But else I think it should work with giving it on the command line as a -D flag so -Dvaadin.pnpm.enable=true