When attempting to upgrade from version 2.4.4 to 2.5.1, I encountered the following error:
c.v.f.s.f.TaskRunDevBundleBuild : Command `C:\Program Files\nodejs\node.exe E:\PROJECT\GITLAB\digital-platform\node_modules\vite\bin\vite.js build` failed:
vite v6.0.11 building for production...
transforming...
Comment replacement failed to change anything
✓ 502 modules transformed.
vite v6.0.11 building for production...
transforming...
✓ 79 modules transformed.
rendering chunks...
computing gzip size...
../build/dev-bundle/webapp/sw.js 65.44 kB │ gzip: 15.93 kB
✓ built in 1.91s
x Build failed in 3.04s
error during build:
[vite]: Rollup failed to resolve import "@vaadin/time-picker/src/vaadin-time-picker-helper.js" from "E:/PROJECT/GITLAB/platform/frontend/generated/jar-resources/vaadin-time-picker/timepickerConnector.js".
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:///E:/PROJECT/GITLAB/platform/node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:51220:17)
at Object.onwarn (file:///E:/PROJECT/GITLAB/platform/node_modules/.vite-temp/vite.config.ts.timestamp-1747387088951-e1b3dfa24a158.mjs:1209:11)
at onwarn (file:///E:/PROJECT/GITLAB/platform/node_modules/@vitejs/plugin-react/dist/index.mjs:280:40)
at onRollupWarning (file:///E:/PROJECT/GITLAB/platform/node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:51250:5)
at onwarn (file:///E:/PROJECT/GITLAB/platform/node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:50918:7)
at file:///E:/PROJECT/GITLAB/platform/node_modules/rollup/dist/es/shared/node-entry.js:19606:13
at Object.logger [as onLog] (file:///E:/PROJECT/GITLAB/platform/node_modules/rollup/dist/es/shared/node-entry.js:21329:9)
at ModuleLoader.handleInvalidResolvedId (file:///E:/PROJECT/GITLAB/platform/node_modules/rollup/dist/es/shared/node-entry.js:20218:26)
at file:///E:/PROJECT/GITLAB/platform/node_modules/rollup/dist/es/shared/node-entry.js:20176:26
I tried deleting the node_modules
directory, the package.json
files, and the Vite-generated files as suggested in the documentation, but it didn’t help. I also tried removing vaadin.pnpm.enable=true
from the properties, but that didn’t make any difference either.
I’d appreciate any additional suggestions or ideas to help fix this issue.