nextcloud-libraries / nextcloud-libraries/nextcloud-vue
[v9.0.0-rc.1] "The `@nextcloud/vue` library was used without setting / replacing the `appName`"
Nobody has claimed this yet.
- Dominant language
- Vue
- Stars
- 246
- Forks
- 99
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 103
Description
Since 9.0.0-alpha.8 (and still with v9.0.0-rc.1) my app shows an error in the browser console:
chunk-MD7AZ4D5.js?v=b43cf7f5:91 [ERROR] @nextcloud/vue: The `@nextcloud/vue` library was used without setting / replacing the `appName`. {uid: 'johndoe', app: '@nextcloud/vue', level: 0}
log @ chunk-MD7AZ4D5.js?v=b43cf7f5:91
error @ chunk-MD7AZ4D5.js?v=b43cf7f5:109
(anonymous) @ appName.ts:15
I traced the cause down to src/utils/appName.ts:
try {
// @ts-expect-error This is a name replaces by the compiler
realAppName = appName
} catch {
logger.error('The `@nextcloud/vue` library was used without setting / replacing the `appName`.')
}
I don't understand what causes the exception. appName is defined and set to my application's name (tested within the entry script).
Possibly relevant because a "compiler" is involved: My app is built with vite and @nextcloud/vite-config.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/utils/appName.ts and reproduce the browser-console error in an app built with Vite and @nextcloud/vite-config. Trace why reading the compiler-replaced appName throws despite the entry script setting it. Done means identifying the cause and defining a verified fix or configuration change that prevents the error while preserving the application name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vite
- Domain
- build-system, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100