Cannot read properties of undefined (reading 'provider') - nuxt apps not starting anymore
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 96
- Avg merge
- 8h 12m
- Merged PRs (30d)
- 2
Description
Environment
- Operating System: Windows_NT
- Node Version: v22.9.0
- Nuxt Version: 3.13.2
- CLI Version: 3.14.0
- Nitro Version: 2.9.7
- Package Manager: yarn@4.5.1
- Builder: -
- User Config: -
- Runtime Modules: -
- Build Modules: -
Reproduction
I haven't changed the code itself, but uninstalled some dependencies and updated everything to latest.
Modules used:
modules: [
"@unocss/nuxt",
"@nuxt/content",
"@vueuse/nuxt",
"@nuxt/fonts",
// @ts-ignore
"@nuxtjs/seo",
"@nuxt/icon",
"nuxt-umami"
],
Dependencies upgraded:
Transitive deps of "@nuxt/icon"
I've tried it with and without the icon config in nuxt.config.ts with no effect
Describe the bug
I`m suddenly getting this error after upgrading a few dependencies and the site is not loading anymore.
Additional context
No response
Logs
Cannot read properties of undefined (reading 'provider')
Stacktrace
setup
@nuxt/icon/dist/runtime/plugin.js:16:17
(anonymous)
./C:/Users/MyPC/Workspace/my-project/apps/my-app/virtual:nuxt:C:/Users/MyPC/Workspace/my-project/apps/my-app/.nuxt/plugins/server.mjs:77:89
Module.executeAsync
unctx/dist/index.mjs:111:19
setup
./C:/Users/MyPC/Workspace/my-project/apps/my-app/virtual:nuxt:C:/Users/MyPC/Workspace/my-project/apps/my-app/.nuxt/plugins/server.mjs:77:65
(anonymous)
nuxt/dist/app/nuxt.js:146:60
fn
nuxt/dist/app/nuxt.js:228:44
Object.callAsync
unctx/dist/index.mjs:68:55
(anonymous)
nuxt/dist/app/nuxt.js:231:56
Object.runWithContext
@vue/runtime-core/dist/runtime-core.cjs.js:3940:18
callWithNuxt
nuxt/dist/app/nuxt.js:231:24
Besides these logs from the devtools plugins I see nothing in the actual logs, even with debug and dev flag
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 by inspecting @nuxt/icon/dist/runtime/plugin.js at line 16 and the generated .nuxt/plugins/server.mjs stack entry, then compare the module versions and nuxt.config.ts settings described in the report. Reproduce the startup failure and identify the dependency or configuration combination causing the undefined provider; done means the Nuxt app starts without this error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxt, typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100