Skip to content

Sourcemap for [file] point to missing source files #569

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

Closed
omar-abdul opened this issue Jan 2, 2023 · 2 comments
Closed

Sourcemap for [file] point to missing source files #569

omar-abdul opened this issue Jan 2, 2023 · 2 comments
Labels
bug Something isn't working has-workaround

Comments

@omar-abdul
Copy link

omar-abdul commented Jan 2, 2023

Describe the bug

Whenever I declare vitePreprocess as my preprocessor I get these warnings for al my pages and components

Sourcemap for "/mnt/Omo Stuff/from stuff/web-svelte/site/src/lib/posts/first-post.md" points to missing source files Sourcemap for "/mnt/Omo Stuff/from stuff/web-svelte/site/src/routes/+layout.svelte" points to missing source files Sourcemap for "/mnt/Omo Stuff/from stuff/web-svelte/site/src/routes/+page.svelte" points to missing source files Sourcemap for "/mnt/Omo Stuff/from stuff/web-svelte/site/src/lib/components/BlogCard.svelte" points to missing source files

Once I change it back to svelte-preprocess the errors go away,

Reproduction URL

https://github.com/omar-abdul/viteissue

Reproduction

Change svelte-preprocess with vitePreprocess

/** @type {import('@sveltejs/kit').Config} */
const config = {
	// Consult https://github.com/sveltejs/svelte-preprocess
	// for more information about preprocessors
	// preprocess: [preprocess({ postcss: true })],
	preprocess:[vitePreprocess(),mdsvex({extensions:['.md']})],
	extensions :['.svelte','.md'],

	kit: {
		adapter: adapter(),
		
	},

}; 

Logs

shell
`Sourcemap for "/mnt/Omo Stuff/from stuff/web-svelte/site/src/lib/posts/first-post.md" points to missing source files
Sourcemap for "/mnt/Omo Stuff/from stuff/web-svelte/site/src/routes/+layout.svelte" points to missing source files
Sourcemap for "/mnt/Omo Stuff/from stuff/web-svelte/site/src/routes/+page.svelte" points to missing source files
Sourcemap for "/mnt/Omo Stuff/from stuff/web-svelte/site/src/lib/components/BlogCard.svelte" points to missing source files`

System Info

Node version 19.3.0
NPM version 9.2.0

vite version 4.0.0
svelte-preprocess version : 4.10.7
@omar-abdul omar-abdul added bug Something isn't working triage Awaiting triage by a project member labels Jan 2, 2023
@dominikg
Copy link
Member

dominikg commented Jan 3, 2023

This seems to be caused by spaces in the directory names of parent directories.

workaround: don't use spaces. Will have to investigate and see if there is something vite-plugin-svelte has to encode or if it is on vite itself to do something about it.

> [email protected] dev /home/dominikg/develop/reproductions/space test
> vite dev


Forced re-optimization of dependencies

  VITE v4.0.3  ready in 521 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h to show help
Sourcemap for "/home/dominikg/develop/reproductions/space test/src/routes/Counter.svelte" points to missing source files
9:55:23 AM [vite-plugin-svelte] ssr compile done.
package   	files	  time	   avg
space-test	    5	69.5ms	13.9ms
is 📦 v0.0.1 via  v18.11.0 took 1m51s 
develop/reproductions/space test ❯ cd ..

~/develop/reproductions ❯ mv space\ test/ space_test

~/develop/reproductions ❯ cd space_test/
is 📦 v0.0.1 via  v18.11.0 
develop/reproductions/space_test ❯ pnpm dev

> [email protected] dev /home/dominikg/develop/reproductions/space_test
> vite dev



  VITE v4.0.3  ready in 507 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h to show help
9:57:30 AM [vite-plugin-svelte] ssr compile done.
package   	files	  time	   avg
space-test	    5	62.1ms	12.4ms
is 📦 v0.0.1 via  v18.11.0 took 14s 
develop/reproductions/space_test ❯ 

@omar-abdul
Copy link
Author

@dominikg its exactly that, I don't know how you figured it out, pretty cool

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

No branches or pull requests

2 participants