You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Generated app does not build: scaffold's caret ranges resolve to an incompatible @nextcloud/vue + @nextcloud/axios pair, and terser-webpack-plugin is undeclared #38
Found while completing a generate → push → build → install end-to-end. The generated app is pushed successfully but cannot be built as shipped, so the published repo is not installable.
Reproduced against a wizard-generated app (72 files), on the scaffold exactly as OpenBuild emits it: npm install (1322 packages, clean) then npm run build.
Defect 1 — terser-webpack-plugin is never declared
The scaffold declares @nextcloud/webpack-vue-config, webpack and webpack-cli, but notterser-webpack-plugin. It is not a dependency or peer dependency of @nextcloud/webpack-vue-config either (its peers are @babel/core, babel-loader, css-loader, node-polyfill-webpack-plugin, sass, sass-loader, style-loader, ts-loader), so nothing installs it. The build cannot start.
Defect 2 — the pinned ranges resolve to an ESM/CJS-incompatible pair
After installing the missing plugin, the build reaches webpack and fails with 14 errors, all of this shape:
ERROR in ./node_modules/@nextcloud/vue/dist/index.cjs 85:0-27
Module not found: Error: "." is not exported under the conditions
["require","module-sync","module","webpack","production","browser"]
from package node_modules/@nextcloud/axios
"@nextcloud/vue": "^8.16.0" -> resolves to 8.40.0
"@nextcloud/axios": "^2.5.0" -> resolves to 2.6.0
Both carets are satisfied, and the resulting pair does not work together. This is not a one-off local artefact: any fresh npm install of a newly generated app resolves the same way today, so every app OpenBuild currently generates fails to build.
The failing imports come from the scaffold's own files, not user code:
Declare terser-webpack-plugin in the scaffold's devDependencies.
Constrain the pair so a fresh install cannot land on the broken combination — pin @nextcloud/vue to a version whose CJS build works with the resolved @nextcloud/axios, or add an overrides/resolutions entry, or drop the direct @nextcloud/axios dependency if @nextcloud/vue is the only consumer.
Worth a CI guard: generate an app from the template and run npm ci && npm run build in the pipeline. Both defects are the kind that only a real build catches, and both are invisible to any test that stops at "the files were generated".
Context
Related to #35 (push fails with a misleading github_unreachable; the real cause there is GitHub rejecting the tree because the scaffold ships 9 .github/workflows/* files and the brokered token lacks the workflow permission). Even with that resolved, the published repo would still not build until the two defects above are fixed.
Verified: pushing the same 72-file tree with a workflow-scoped token succeeds and all 9 workflow files land, so the generation and publish mechanics themselves are sound.
Instance: NC 34.0.0.12, openbuild 0.9.0. Node build run on the host with npm.
Activity