Import createRouter does not exist in h3 export
See original GitHub issueEnvironment
Nuxt CLI v3.0.0-27490192.4253d2e 16:02:07 RootDir: C:\Users\Lenovo\Desktop\sat 16:02:10 Nuxt project info: 16:02:10
- Nuxt Version:
3.0.0-27490192.4253d2e
- Package Manager:
npm@8.1.4
- Builder:
vite
- User Config:
buildModules
,css
- Runtime Modules:
-
- Build Modules:
@pinia/nuxt@0.1.8
,nuxt-windicss@2.2.8
Package error: h3 => v0.3.9
Reproduction
I did a npm update and after it started showing the error on npm run dev. yesterday had no problems.
When I manually install “npm i h3” to the latest version it works.
Describe the bug
ERROR [worker reload] [worker init] The requested module ‘PROJECT/node_modules/h3/dist/index.mjs’ does not provide an export named ‘createRouter’
import { handleCacheHeaders, toEventHandler, createApp, createRouter, lazyEventHandler, eventHandler, useQuery } from ‘PROJECT/node_modules/h3/dist/index.mjs’; ^^^^^^^^^^^^ SyntaxError: The requested module ‘PROJECT/node_modules/h3/dist/index.mjs’ does not provide an export named ‘createRouter’ at ModuleJob._instantiate (node:internal/modules/esm/module_job:127:21) at async ModuleJob.run (node:internal/modules/esm/module_job:193:5) at async Promise.all (index 0) at async ESMLoader.import (node:internal/modules/esm/loader:337:24) at async loadESM (node:internal/process/esm_loader:88:5) at async handleMainPromise (node:internal/modules/run_main:61:12)
Additional context
No response
Logs
No response
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top GitHub Comments
Thanks. We need to bump the version in
unstorage
(cc: @pi0).In future I’d recommend running
npx nuxi upgrade
ornpx nuxi upgrade --force
.Should be fixed now. At least for windicss https://github.com/windicss/nuxt-windicss/releases/tag/v2.2.9