Infos:
- Used Zammad version: 6.3.1 bookworm
- Used Zammad installation type: package
- Operating system: Debian 12
- Browser + version: Edge (latest)
After testing this on a (fresh) test system, I executed the following command in the zammad folder of our production system:
sudo -u zammad RAILS_ENV=production zammad run rake assets:precompile --trace
No changes have been made to the code yet, but I wanted to do a dry run before making any changes.
There were no problems on the test system, so I’m a little surprised that there are any on the live system.
It seems that Vite doesn’t really cope with referenced imports and some files are not available:
** Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Execute assets:precompile
** Invoke vite:install_dependencies (first_time)
** Execute vite:install_dependencies
yarn install v1.22.19
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
Done in 0.93s.
** Invoke vite:build_all (first_time)
** Invoke vite:verify_install (first_time)
** Invoke environment
** Execute vite:verify_install
** Execute vite:build_all
Building with Vite ⚡️
vite v5.2.6 building for production...
transforming...
✓ 1349 modules transformed.
x Build failed in 10.27s
error during build:
Error: [vite-plugin-pwa:build] [vite]: Rollup failed to resolve import "@shared/form/core/createInput" from "/opt/zammad/app/frontend/shared/components/Form/fields/FieldAutoComplete/index.ts".
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:///opt/zammad/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:67418:27)
at onRollupWarning (file:///opt/zammad/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:67446:9)
at onwarn (file:///opt/zammad/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:67150:13)
at file:///opt/zammad/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:18303:13
at Object.logger [as onLog] (file:///opt/zammad/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:19950:9)
at ModuleLoader.handleInvalidResolvedId (file:///opt/zammad/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:18893:26)
at file:///opt/zammad/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:18851:26
pid 886576 exit 1
Build with Vite failed! ❌
Is there a way to regenerate the files in the shared directory?
I’ve already tried:
apt reinstall zammad
But it didn’t help either, as the files don’t seem to be affected.
Expected behavior:
- should run without errors
Actual behavior:
- throws an error
Steps to reproduce the behavior:
- I was unable to reproduce the error on other fresh installed (test-)systems as the cause is unknown to me.