Nuxt not creating routes and not detecting changes in pages directory?
See original GitHub issueEnvironment
- Operating System:
Windows_NT
- Node Version:
v16.13.1
- Nuxt Version:
3.0.0-27338323.1e98259
- Package Manager:
npm@8.1.2
- Bundler:
Vite
- User Config:
-
- Runtime Modules:
-
- Build Modules:
-
Reproduction
- Followed README.md installation guide with npm.
- Created pages folder
- Created index.vue in /pages
- Changed index.vue to home.vue
Describe the bug
nuxt is not creating routes i think?
Additional context
const vite_ssr_import_6 = await vite_ssr_import(“/@id/__x00__virtual:C:/Users/BUGA/Documents/VSCODE/Web Projects/nuxt3-app/.nuxt/routes.mjs”);
const router = __vite_ssr_import_1__.createRouter({ history: routerHistory, routes: __vite_ssr_import_6__.default });
__vite_ssr_import_6__.default
returns undefined
Logs
Cannot read properties of undefined (reading 'forEach')
at createRouterMatcher (C:\Users\BUGA\Documents\VSCODE\Web Projects\nuxt3-app\node_modules\vue-router\dist\vue-router.cjs.js:1469:12)
at Module.createRouter (C:\Users\BUGA\Documents\VSCODE\Web Projects\nuxt3-app\node_modules\vue-router\dist\vue-router.cjs.js:2796:21)
at file:///C:/Users/BUGA/Documents/VSCODE/Web%20Projects/nuxt3-app/.nuxt/dist/server/server.mjs:1743:40
at file:///C:/Users/BUGA/Documents/VSCODE/Web%20Projects/nuxt3-app/.nuxt/dist/server/server.mjs:210:57
at callWithNuxt (file:///C:/Users/BUGA/Documents/VSCODE/Web%20Projects/nuxt3-app/.nuxt/dist/server/server.mjs:259:13)
at applyPlugin (file:///C:/Users/BUGA/Documents/VSCODE/Web%20Projects/nuxt3-app/.nuxt/dist/server/server.mjs:210:29)
at Module.applyPlugins (file:///C:/Users/BUGA/Documents/VSCODE/Web%20Projects/nuxt3-app/.nuxt/dist/server/server.mjs:220:11)
at async createNuxtAppServer (file:///C:/Users/BUGA/Documents/VSCODE/Web%20Projects/nuxt3-app/.nuxt/dist/server/server.mjs:51:5)
at async renderToString (file:///C:/Users/BUGA/Documents/VSCODE/Web%20Projects/nuxt3-app/node_modules/vue-bundle-renderer/dist/index.mjs:248:19)
at async renderMiddleware (file:///C:/Users/BUGA/Documents/VSCODE/Web%20Projects/nuxt3-app/.nuxt/nitro/index.mjs:191:20)Cannot read properties of undefined (reading 'forEach')
at createRouterMatcher (C:\Users\BUGA\Documents\VSCODE\Web Projects\nuxt3-app\node_modules\vue-router\dist\vue-router.cjs.js:1469:12)
at Module.createRouter (C:\Users\BUGA\Documents\VSCODE\Web Projects\nuxt3-app\node_modules\vue-router\dist\vue-router.cjs.js:2796:21)
at file:///C:/Users/BUGA/Documents/VSCODE/Web%20Projects/nuxt3-app/.nuxt/dist/server/server.mjs:1743:40
at file:///C:/Users/BUGA/Documents/VSCODE/Web%20Projects/nuxt3-app/.nuxt/dist/server/server.mjs:210:57
at callWithNuxt (file:///C:/Users/BUGA/Documents/VSCODE/Web%20Projects/nuxt3-app/.nuxt/dist/server/server.mjs:259:13)
at applyPlugin (file:///C:/Users/BUGA/Documents/VSCODE/Web%20Projects/nuxt3-app/.nuxt/dist/server/server.mjs:210:29)
at Module.applyPlugins (file:///C:/Users/BUGA/Documents/VSCODE/Web%20Projects/nuxt3-app/.nuxt/dist/server/server.mjs:220:11)
at async createNuxtAppServer (file:///C:/Users/BUGA/Documents/VSCODE/Web%20Projects/nuxt3-app/.nuxt/dist/server/server.mjs:51:5)
at async renderToString (file:///C:/Users/BUGA/Documents/VSCODE/Web%20Projects/nuxt3-app/node_modules/vue-bundle-renderer/dist/index.mjs:248:19)
at async renderMiddleware (file:///C:/Users/BUGA/Documents/VSCODE/Web%20Projects/nuxt3-app/.nuxt/nitro/index.mjs:191:20)
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Nuxt doesn't update on route change - vue.js - Stack Overflow
Fetch is triggered, but the content on the page is not updated. Url in browser is changed. Here's a few things I've tried...
Read more >The router Property - Nuxt
The router property. The router property lets you customize Nuxt router. (vue-router ). base. Type: String; Default: '/'. The base URL of the...
Read more >File System Routing - Nuxt
File system routing. Nuxt automatically generates the vue-router configuration based on your file tree of Vue files inside the pages directory.
Read more >The generate Property - Nuxt
Directory name created when building web applications using the nuxt generate ... by excludes (the files that you do not want generated as...
Read more >Server Side Rendering - Nuxt
Because you are in a Node.js environment you have access to Node.js objects such as req and res . You do not have...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@danielroe oh… idk how i missed that sorry. now the issue i get is the same as #1367
@rashidmya You need to add
<NuxtPage />
in yourapp.vue
. Docs.