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 3, sourcemap points to missing file warning, when using external script files in vue template.

See original GitHub issue

Environment

  • Operating System: Windows_NT
  • Node Version: v16.13.2
  • Nuxt Version: 3.0.0-rc.3
  • Package Manager: npm@8.3.0
  • Builder: vite
  • User Config: privateRuntimeConfig, publicRuntimeConfig, pageTransition, css, app, algolia, components, router, modules, build, vite, hooks, nitro
  • Runtime Modules: @vueuse/nuxt@8.6.0, ~/modules/sitemap, @nuxtjs/algolia@0.9.2, ~/modules/robots, ~/modules/staticWebApp
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-jbyf5k-sa9vua?file=pages%2Findex.vue

Describe the bug

When using external script files it gives an warning pr. import in my solution:

“Sourcemap for “C:/Folder/repo/filepath.page.ts” points to missing source files .”

image

Is there a confirguration to disable sourcemap for at certain suffix file? I think this is poitning to vite in nuxt.

Additional context

I can see there is a similar issue on react regarding this warning. https://github.com/vitejs/vite/issues/5438

Logs

No response

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
jakubhrubycommented, Nov 30, 2022

Present again in stable 3.0.0

2reactions
danielroecommented, Jun 21, 2022

Note to self or whoever looks at this first: Issue can be resolved by prefixing with \0 or dep: (https://github.com/vitejs/vite/pull/5587) - but see https://github.com/nuxt/framework/pull/4512 for context - we will need to ensure we’re still transforming virtual modules with other plugins.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The build Property - Nuxt
Nuxt lets you customize the webpack configuration for building your web application as you want.
Read more >
Sourcemap missing for typescript based vue file due to lang ...
I found that with devtool = 'cheap-module-eval-source' it works but directory of the .vue files is not shown and file endings are bit...
Read more >
4 Reasons Why Your Source Maps are Broken - Sentry Blog
Missing or incorrect source map directive · Missing original source files · Bad source maps caused by multiple transformations · Files are ...
Read more >
[nuxt] [request error] require is not defined in es module scope ...
*multiple* WARN Sourcemap for ".../node_modules/algosdk/dist/esm/src/..." points to missing source file [nuxt] [request error] require is not defined in ES ...
Read more >
SourceMapDevToolPlugin - webpack
Usually the #sourceMappingURL comment. [url] is replaced with a URL to the source map file. Since webpack v4.36.0, path parameters are supported: [chunk] ......
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