Skip to content

PiT 25.0: migrating certain projects from 24.9 to 25.0 fail to find vaadin components in node_modules #22676

@manolo

Description

@manolo

Description of the bug

When we have a starter with react views created for v24.9 and we try to migrate to v25.0 it fails with the following error:

 Failed to find the following imports in the `node_modules` tree:
      - @vaadin/list-box/src/vaadin-list-box.js
      - @vaadin/number-field/src/vaadin-number-field.js
      [ . . . ]

  If the build fails, check that npm packages are installed.

  To fix the build remove `package-lock.json` and `node_modules` directory to reset modules.
  In addition you may run `npm install` to fix `node_modules` tree structure.

Workaround

run `mvn vaadin:clean-frontend'

Expected behavior

Either:

  • Flow is able to clean when it finds version has been bumped, or there are no components in node_module
  • Migration guide indication to run vaadin:clean-frontend goal after bumping versions

Minimal reproducible example

curl -f 'https://start.vaadin.com/dl?&preset=react&projectName=react' -o 'react.zip'
unzip -q 'react.zip'
cd 'react'
perl -pi -e 's|(\s*<'vaadin.version'>)[^\s]+(</'vaadin.version'>)|${1}25.0.0-beta4${2}|g' pom.xml
perl -0777 -pi -e 's|(\s+)(<parent>\s*<groupId>)(org.springframework.boot)(</groupId>\s*<artifactId>)(spring-boot-starter-parent)(</artifactId>\s*)(?:(<version>)([^<]+)(</version>))?(\s*)(.*?)?(\s*</parent>)|${1}${2}'org.springframework.boot'${4}'spring-boot-starter-parent'${6}${7}4.0.0-RC1${9}${10}${11}${12}|msg' pom.xml
./mvnw -ntp -B

Versions

  • Vaadin / Flow version: 25.0.0-beta4

Metadata

Metadata

Assignees

Type

Projects

Status

🏗 WIP

Status

🔎Iteration reviews

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions