Upgrade from 23.3 to 24.1 -> vite fails

Hi all,
I’m upgrading my Vaadin 23.3 project to 24.1. I’ve followed the migration guide, java compilation is ok but the app fails to start because of a vite error :

transforming...
✓ 159 modules transformed.
✓ built in 1.82s
[vite]: Rollup failed to resolve import "undefined" from "undefined".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
error during build:
Error: [vite]: Rollup failed to resolve import "undefined" from "undefined".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
    at viteWarn (file:///Users/charlus/Devpt/Ocell/Products/ovisuserver-vaadin24/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:46597:23)
    at onwarn (/Users/charlus/Devpt/Ocell/Products/ovisuserver-vaadin24/vite.config.ts:1195:11)
    at onRollupWarning (file:///Users/charlus/Devpt/Ocell/Products/ovisuserver-vaadin24/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:46618:9)
    at onwarn (file:///Users/charlus/Devpt/Ocell/Products/ovisuserver-vaadin24/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:46368:13)
    at Object.onwarn (file:///Users/charlus/Devpt/Ocell/Products/ovisuserver-vaadin24/node_modules/rollup/dist/es/shared/rollup.js:23263:13)
    at ModuleLoader.handleResolveId (file:///Users/charlus/Devpt/Ocell/Products/ovisuserver-vaadin24/node_modules/rollup/dist/es/shared/rollup.js:22158:26)
    at file:///Users/charlus/Devpt/Ocell/Products/ovisuserver-vaadin24/node_modules/rollup/dist/es/shared/rollup.js:22119:26
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Any hint/idea on how to find what’s causing this ? probably one of my lit templates …
Thanks !

I’ve tried to dig a little bit , I’m running /usr/local/bin/node node_modules/vite/bin/vite.js -l info build and it’s now giving info about the offending file : ```vite v4.3.9 building for production…
✓ 184 modules transformed.
✓ built in 1.42s
transforming (538) …/node_modules/@vaadin/a11y-base/src/disabled-mixin.js[vite]: Rollup failed to resolve import “undefined” from “undefined”.
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
build.rollupOptions.external
error during build:
Error: [vite]: Rollup failed to resolve import “undefined” from “undefined”.
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
build.rollupOptions.external
at viteWarn (file:///Users/charlus/Devpt/Ocell/Products/ovisuserver-vaadin24/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:46597:23)
at onwarn (/Users/charlus/Devpt/Ocell/Products/ovisuserver-vaadin24/vite.config.ts:1195:11)
at onRollupWarning (file:///Users/charlus/Devpt/Ocell/Products/ovisuserver-vaadin24/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:46618:9)
at onwarn (file:///Users/charlus/Devpt/Ocell/Products/ovisuserver-vaadin24/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:46368:13)
at Object.onwarn (file:///Users/charlus/Devpt/Ocell/Products/ovisuserver-vaadin24/node_modules/rollup/dist/es/shared/rollup.js:23263:13)
at ModuleLoader.handleResolveId (file:///Users/charlus/Devpt/Ocell/Products/ovisuserver-vaadin24/node_modules/rollup/dist/es/shared/rollup.js:22158:26)
at file:///Users/charlus/Devpt/Ocell/Products/ovisuserver-vaadin24/node_modules/rollup/dist/es/shared/rollup.js:22119:26
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

If I check the file it appears it’s a vaadin provided file which contains polymer references : ```/**

  • @license
  • Copyright (c) 2021 - 2023 Vaadin Ltd.
  • This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
    */
    import { dedupingMixin } from ‘@polymer/polymer/lib/utils/mixin.js’;

/**

  • A mixin to provide disabled property for field components.
  • @polymerMixin
    */
    export const DisabledMixin = dedupingMixin(

I thought polymer was not supported anymore so I’m curious about why It’s still referenced here

I finally figured it out. It appears that it was caused by the theme.js which had been generated by the vaddin-start of version 23 when I started the 23 project. I removed it and now it’s ok (I also had to fix a bunch of invalid imports in the view templates which where working fine in 23. For example : import '@vaadin/vaadin-ordered-layout/src/vaadin-vertical-layout.js'; which is now -> import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js';