Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Disabling dev tool make the project crash #667

Open
Arcelone opened this issue May 19, 2024 · 15 comments
Open

fix: Disabling dev tool make the project crash #667

Arcelone opened this issue May 19, 2024 · 15 comments
Labels
bug Something isn't working

Comments

@Arcelone
Copy link

🐛 The bug

When you create a new project with :

npx nuxi@latest init test

then run :

npx nuxi devtools disable

the run the project with : npm run dev

you get this error :

 ERROR  Internal server error: Failed to resolve import "virtual:vue-inspector-path:Overlay.vue" from "node_modules/vite-plugin-vue-inspector/src/load.js?v=51e81404". Does the file exist?       15:45:51
  Plugin: vite:import-analysis
  File: /Users/landry/Desktop/test/node_modules/vite-plugin-vue-inspector/src/load.js?v=51e81404:4:18
  2  |
  3  |  import * as Vue from 'vue'
  4  |  import App from 'virtual:vue-inspector-path:Overlay.vue'
     |                   ^
  5  |  import inspectorOptions from 'virtual:vue-inspector-options'
  6  |  const CONTAINER_ID = 'vue-inspector-container'
      at formatError (file:///Users/landry/Desktop/test/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:50830:46)
      at TransformContext.error (file:///Users/landry/Desktop/test/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:50824:19)
      at normalizeUrl (file:///Users/landry/Desktop/test/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:66128:33)
      at async file:///Users/landry/Desktop/test/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:66283:47
      at async Promise.all (index 1)
      at async TransformContext.transform (file:///Users/landry/Desktop/test/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:66204:13)
      at async Object.transform (file:///Users/landry/Desktop/test/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:51139:30)
      at async loadAndTransform (file:///Users/landry/Desktop/test/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:53894:29)

🛠️ To reproduce

https://github.com/Arcelone/devtoolsbug

🌈 Expected behavior

That the project works properly without the devtools.

ℹ️ Additional context

.nuxtrc contain just this telemetry.enabled=false
version :

  • nvm : 0.39.7 (installed with curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash)
  • node : v20.13.1
  • npm : 10.8.0
  • Nuxt : 3.11.2
  • Nitro 2.9.6

No "system" version of node installed. I have tried with but doesn't solve anything.

If you create the project with :

npx nuxi@latest init content-app -t content

and the disable with :

npx nuxi devtools disable

everything is working well.

@Arcelone Arcelone added the bug Something isn't working label May 19, 2024
@cpninjaru
Copy link

nuxt.config.ts

export default defineNuxtConfig({
  vite: {
    server: {
      hmr: {
        overlay: false,
      },
    },
  },
})

@arashsheyda
Copy link
Member

@Arcelone I just did your reproduction steps and I got no error, worked as expected

@Arcelone
Copy link
Author

Arcelone commented Jul 6, 2024

This behavior is fix withe 3.12 version release. 👍🏻

EDIT : obviously present again in subsequent versions.

@Arcelone Arcelone closed this as completed Jul 6, 2024
@franzwarning
Copy link

I'm getting this as well, 3.12.4

@BombayV
Copy link

BombayV commented Aug 13, 2024

Can confirm, I'm getting the same error in 3.12.4.

@Matrix-aas
Copy link

Can confirm, I'm getting the same error in 3.13.0 also.

 ERROR  Internal server error: Failed to resolve import "virtual:vue-inspector-path:Overlay.vue" from "../../node_modules/vite-plugin-vue-inspector/src/load.js?v=dc493e27". Does the file exist?                                                                                                                                                                                                                                                                       3:58:51 PM
   Plugin: vite:import-analysis
   File: ./node_modules/vite-plugin-vue-inspector/src/load.js?v=dc493e27:4:18
   2  |  
   3  |  import * as Vue from 'vue'
   4  |  import App from 'virtual:vue-inspector-path:Overlay.vue'
       |                   ^
   5  |  import inspectorOptions from 'virtual:vue-inspector-options'
   6  |  const CONTAINER_ID = 'vue-inspector-container'

@arashsheyda arashsheyda reopened this Aug 26, 2024
@MikeMichel
Copy link

MikeMichel commented Sep 14, 2024

Get this in latest Chrome but not when using inkognito or in Firefox on a mac.

@mtzrmzia
Copy link

Still getting this issue with 3.13.2

@pwnkdigital
Copy link

Same. 3.13.2

@Arcelone
Copy link
Author

Arcelone commented Oct 1, 2024

Fix with this version :

  • Nuxt Version: 3.13.2
  • CLI Version: 3.14.0
  • Nitro Version: 2.9.7

If any one can confirme ? That I can close the issue.

@Willadaygo
Copy link

same! 3.13.2

@murshex
Copy link

murshex commented Oct 9, 2024

Same problem

@pwnkdigital
Copy link

pwnkdigital commented Oct 9, 2024

So, on 3.13.2, i managed to get it going again by adding this explicitly on nuxt.config.ts:

devtools: {
    enabled: false,
}

also, i read somewhere that nuxt-security might be causing the issue, but I can't confirm. I've got nuxt-security set up, with the headers settings to make devtools work, but if i explicitly disable them with the code above, it doesn't crash.

@murshex
Copy link

murshex commented Oct 9, 2024

Problem went away on its own.. not really sure what happened.

@Curs3W4ll
Copy link

Still having this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests