Installed fresh development environment, which came with npm 7.5, node 15. The build fails.
Build should work with latest development tools.
- Vaadin / Flow version: master branch
- Java version:
- OS version: Mac
@mstahv do you get the error like this when flow-client is being built?
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: @vaadin/[email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/typescript
npm ERR! dev typescript@"4.0.3" from the root project
npm ERR! peer typescript@">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev" from [email protected]
npm ERR! node_modules/tslint
npm ERR! dev tslint@"^5.12.1" from the root project
npm ERR! peer tslint@"^5.0.0" from [email protected]
npm ERR! node_modules/tslint-eslint-rules
npm ERR! dev tslint-eslint-rules@"^5.4.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer typescript@"^2.2.0 || ^3.0.0" from [email protected]
npm ERR! node_modules/tslint-eslint-rules
npm ERR! dev tslint-eslint-rules@"^5.4.0" from the root project
I got this error while building the flow master on a clean project with node 15 and npm 7.
Now trying to use another typescript version.
Labeled this ticket with fusion because seems to be a typescript/tslint version conflict in flow-client.
It seems that in case you already have a populated node_modules or working package-lock.json in flow-client the problem doesn't occur even with latest npm 7.
I can reproduce the issue currently with following environment:
master branch (currently at commit f116492bca007ab11a6215a8ffb2d3065f32e420)You only need to build flow-client module to reproduce the issue so for speedy repro just cd into flow-client and then run:
rm -rf node_modules package-lock.json
mvn clean install -DskipTests
You can get it working again by downgrading npm with:
npm i -g npm@6
And then to repro again, just upgrade to latest npm with
npm i -g npm
and run the rm and mvn step from above.
When using latest Node 15 and npm 7 this is the error that happens:
[INFO] --- exec-maven-plugin:1.6.0:exec (npm-install) @ flow-client ---
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: @vaadin/[email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/typescript
npm ERR! dev typescript@"4.0.3" from the root project
npm ERR! peer typescript@">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev" from [email protected]
npm ERR! node_modules/tslint
npm ERR! dev tslint@"^5.12.1" from the root project
npm ERR! peer tslint@"^5.0.0" from [email protected]
npm ERR! node_modules/tslint-eslint-rules
npm ERR! dev tslint-eslint-rules@"^5.4.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer typescript@"^2.2.0 || ^3.0.0" from [email protected]
npm ERR! node_modules/tslint-eslint-rules
npm ERR! dev tslint-eslint-rules@"^5.4.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/haprog/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/haprog/.npm/_logs/2021-03-01T13_00_05_034Z-debug.log
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:804)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:751)
at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:313)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
Note: tslint-eslint-rules is 3 years old and TSLint is deprecated. Will change linter to https://github.com/typescript-eslint/typescript-eslint .