question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nuxt app instance unavailable while using autoImports and nitro set false

See original GitHub issue

Environment


  • Operating System: Darwin
  • Node Version: v14.17.6
  • Nuxt Version: 2.16.0-27358576.777a4b7f
  • Package Manager: yarn@1.22.18
  • Builder: webpack
  • User Config: target, head, css, components, buildModules, build, bridge
  • Runtime Modules: -
  • Build Modules: @pinia/nuxt@0.1.8, @nuxt/bridge@3.0.0-27498038.f18e68b

Reproduction

https://github.com/piniajs/example-nuxt-bridge

I used this example project. Also nuxt bridge version is: 3.0.0-27498038.f18e68b

Describe the bug

  1. Set autoImports: true and nitro: false in nuxt.config.js
  2. Add const route = useRoute(); line anywhere in setup inside the index.vue page.
  3. Run project and try refresh page twice.

Cannot use autoImports when nitro is set false.

Additional context

I commented this 3 line and error gone. image

But i got some errors on console after removing these lines. Because these lines added for prevent context-sharing in server-side. image

Logs

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
danielroecommented, Jul 9, 2022

It seems so: https://stackblitz.com/edit/github-tas3ez.

Let me know if not and I’ll reopen.

2reactions
danielroecommented, Jul 1, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Nuxt instance unavailable on all pages · Issue #4287 - GitHub
I get error nuxt instance unavailable when play with i18n config, properties seo: false or strategy: 'prefix'. [nitro] [dev] ...
Read more >
Nuxt 3 package import specifier "#internal/nitro" is not defined
I randomly fixed this issue by setting // nuxt.config.ts ssr: false. Hope its the case for you too. With client side rendering only...
Read more >
The components Property - Nuxt
Type: Boolean or Array; Default: false. When set to true or an options object, Nuxt will include @nuxt/components and auto-import your components wherever ......
Read more >
Rendering Modes · Nuxt Concepts
Nuxt supports different rendering modes. Each one has pros and cons covered in this section.
Read more >
EC2 — Boto3 Docs 1.26.34 documentation - Amazon AWS
Using Amazon EC2 eliminates the need to invest in hardware up front, so you can develop and deploy applications faster. Amazon Virtual Private...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found