nuxt / bridge

🌉 Experience Nuxt 3 features on existing Nuxt 2 projects
MIT License
268 stars 28 forks source link

nuxt app instance unavailable with Apollo Graphql #485

Open Luferov opened 1 year ago

Luferov commented 1 year ago

Environment


Reproduction

https://github.com/Luferov/nuxt-graphql-bug

git clone git@github.com:Luferov/nuxt-graphql-bug.git cd nuxt-graphql-bug yarn

OK, its work! But

rm -r node_modules && rm -r .nuxt && yarn

It is not work.

Describe the bug

I created yarn.lock from my project and project is wok. But if delete yarn.lock and run command yarn, Nuxt will update up nuxt 3-rc and project is not working.

image

image

Additional context

No response

Logs

[nuxt] [request error] nuxt app instance unavailable
  at useNuxtApp (./.nuxt/dist/server/server.js:15661:13)  
  at useRuntimeConfig (./.nuxt/dist/server/server.js:16127:78)  
  at ./.nuxt/dist/server/server.js:66176:68  
  at module.exports../.nuxt/apollo-module.js.__webpack_exports__.default (./.nuxt/dist/server/server.js:404:25)  
  at createApp (./.nuxt/dist/server/server.js:1463:93)  
  at async module.exports../.nuxt/server.js.__webpack_exports__.default (./.nuxt/dist/server/server.js:3687:7)  
  at async Object.renderToString (./node_modules/vue-bundle-renderer/dist/index.mjs:264:19)  
  at async ./.nuxt/dev/index.mjs:499:20  
  at async ./node_modules/h3/dist/index.mjs:492:19  
  at async Server.nodeHandler (./node_modules/h3/dist/index.mjs:438:7)
Luferov commented 1 year ago

May it depend with https://github.com/nuxt/bridge/issues/436