Skip to content

Cannot read properties of undefined (reading 'modules') #14802

@gurpindersinghgill

Description

@gurpindersinghgill

Environment


  • Operating System: Darwin
  • Node Version: v16.14.0
  • Nuxt Version: 3.0.0-rc.9
  • Nitro Version: 0.5.0
  • Package Manager: [email protected]
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

  1. npx nuxi init nuxt-app
  2. cd nuxt-app
  3. npm install
  4. npm run dev

Error is thrown only when running on macbook...

Describe the bug

Unable to run dev after fresh install on Macbook.
However, doing npm run build, and npm run preview works without issue.
Testing in stackblitz shows no issues however.

Additional context

Had no issues yesterday when doing fresh install of rc.9

Logs

gurpinder@Gurpinders-MacBook-Pro bug % npx nuxi init bug-test
Need to install the following packages:
  nuxi
Ok to proceed? (y) 
Nuxi 3.0.0-rc.9                                                                                         22:28:53
ℹ cloned nuxt/starter#v3 to /Users/gurpinder/Desktop/bug/bug-test                                       22:28:54
                                                                                                        22:28:54
Nuxi 3.0.0-rc.9                                                                                                              22:29:51
Nuxt 3.0.0-rc.9 with Nitro 0.5.0                                                                                             22:29:51
                                                                                                                             22:29:54
  > Local:    http://localhost:3000/ 
  > Network:  http://192.168.0.106:3000/

ℹ Vite server warmed up in 171ms                                                                                             22:29:55
✔ Nitro built in 185 ms                                                                                                nitro 22:29:55
ℹ Vite client warmed up in 701ms                                                                                             22:29:55
[Vue warn]: inject() can only be used inside setup() or functional components.
[Vue warn]: Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.
[Vue warn]: Unhandled error during execution of setup function 
  at <NuxtRoot>
[nuxt] [request error] [unhandled] [500] Cannot read properties of undefined (reading 'modules')
  at _sfc_main.setup (./node_modules/nuxt/dist/app/components/nuxt-root.vue:67:16)  
  at callWithErrorHandling (./node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:157:22)  
  at setupStatefulComponent (./node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:7107:29)  
  at setupComponent (./node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:7062:11)  
  at renderComponentVNode (./node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:172:17)  
  at renderToString (./node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:446:26)  
  at Object.renderToString$1 [as renderToString] (./.nuxt/dev/index.mjs:472:24)  
  at Object.renderToString (./node_modules/vue-bundle-renderer/dist/runtime.mjs:173:40)  
  at processTicksAndRejections (node:internal/process/task_queues:96:5)  
  at async ./.nuxt/dev/index.mjs:521:21
[Vue warn]: inject() can only be used inside setup() or functional components.
[Vue warn]: Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.
[Vue warn]: Unhandled error during execution of setup function 
  at <NuxtRoot>
[Vue warn]: inject() can only be used inside setup() or functional components.
[Vue warn]: Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.
[Vue warn]: Unhandled error during execution of setup function 
  at <NuxtRoot>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions