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

Dev server warning: Sourcemap for "..." points to missing source files #5053

Closed
1 task
panwauu opened this issue Oct 11, 2022 · 12 comments
Closed
1 task

Dev server warning: Sourcemap for "..." points to missing source files #5053

panwauu opened this issue Oct 11, 2022 · 12 comments
Assignees
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)

Comments

@panwauu
Copy link
Contributor

panwauu commented Oct 11, 2022

What version of astro are you using?

1.4.6

Are you using an SSR adapter? If so, which one?

vercel

What package manager are you using?

npm

What operating system are you using?

Windows

Describe the Bug

Since upgrading from 1.4.4 to 1.4.6 I get the error messages below. Only during the first call of the website directly after the start of the dev server.

> astro dev

   astro  v1.4.6 started in 233ms

  ┃ Local    http://127.0.0.1:3000/
  ┃ Network  use --host to expose

Sourcemap for "C:/Users/bauma/source/wetter/client/src/pages/index.astro" points to missing source files
Sourcemap for "C:/Users/bauma/source/wetter/client/src/layouts/Layout.astro" points to missing source files
Sourcemap for "C:/Users/bauma/source/wetter/client/src/components/WebcamImages.astro" points to missing source files     
Sourcemap for "C:/Users/bauma/source/wetter/client/src/components/AllgemeinTabelle.astro" points to missing source files 
Sourcemap for "C:/Users/bauma/source/wetter/client/src/components/WeatherOverviewBar.astro" points to missing source files

I tested:

  • v1.4.3: No warnings
  • v1.4.4: No warnings
  • v1.4.5: Warnings
  • v1.4.6: Warnings
  • v1.4.7: Warnings

So it seems it was introduced in v1.4.5 where there was a quite extensive CHANGELOG.

Reported by:
https://discord.com/channels/830184174198718474/1002802338538463313/1029048088746283110
https://discord.com/channels/830184174198718474/1028832250990710794
https://discord.com/channels/830184174198718474/1028260666722746399

Link to Minimal Reproducible Example

Could not reproduce

Participation

  • I am willing to submit a pull request for this issue.
@mandar1jn
Copy link
Contributor

I also encountered this when upgrading from 1.4.4 to 1.4.6

@mandar1jn
Copy link
Contributor

20D34631-E034-4C7F-891E-FCB5B8E6A915

I’m guessing it might have been introduced here

@RobertAKARobin
Copy link

RobertAKARobin commented Oct 11, 2022

I'm getting this too, but only when I include this line:

const isProd = Boolean(import.meta.env.PROD);

Without that the warning doesn't show. (That's my only reference to import.meta.env)

FWIW so far I haven't seen any issues caused by this, but haven't looked very hard.

@rhizodigital
Copy link

I'm getting same error with fresh install of astro v1.4.7, error comes after adding tailwind integration.
Screenshot 2022-10-12 at 15 33 16

@rhizodigital
Copy link

If I remove tailwind from astro.config.mjs error goes away.

@tony-sull
Copy link
Contributor

20D34631-E034-4C7F-891E-FCB5B8E6A915

I’m guessing it might have been introduced here

That fix shouldn't be related, that fix was just disabling one specific console warning in dev that was related to getStaticPaths()

Really interesting that some people have seen this go away when removing Tailwind, I wonder if there's a tailwind sourcemap being lost along the way?

@kaminskyalexander
Copy link

I've also had this exact issue appear on 1.4.5 and 1.4.6 only when the Tailwind integration is installed. Uninstalling it fixes the console warning.

@bluwy
Copy link
Member

bluwy commented Oct 13, 2022

It may also be caused by #4918 as I added a postprocessing step for all Astro files, though we did return the right sourcemap, I'm not sure how the tailwind integration causes the error too.

@panwauu
Copy link
Contributor Author

panwauu commented Oct 13, 2022

I encounter the problem without the tailwind integration. I am using image and vercel Integrations

@bluwy bluwy self-assigned this Oct 13, 2022
@bluwy bluwy added the - P3: minor bug An edge case that only affects very specific usage (priority) label Oct 13, 2022
@bluwy
Copy link
Member

bluwy commented Oct 14, 2022

Did a bit of digging and #4990 seems to be causing it. Here's the sourcemap for the with-tailwindcss example src/pages/index.astro:

in 0.26.0:

{
  "version": 3,
  "sources": ["/Users/bjorn/Work/oss/astro/examples/with-tailwindcss/src/pages/index.astro", "astro:runtime"],
  "sourcesContent": ["---\n// Component Imports\nimport Button from '../components/Button.astro';\n\n// Full Astro Component Syntax:\n// https://docs.astro.build/core-concepts/astro-components/\n---\n\n\u003chtml lang=\"en\"\u003e\n\t\u003chead\u003e\n\t\t\u003cmeta charset=\"utf-8\" /\u003e\n\t\t\u003cmeta name=\"viewport\" content=\"width=device-width\" /\u003e\n\t\t\u003clink rel=\"icon\" type=\"image/svg+xml\" href=\"/favicon.svg\" /\u003e\n\t\t\u003cmeta name=\"generator\" content={Astro.generator} /\u003e\n\t\t\u003ctitle\u003eAstro + TailwindCSS\u003c/title\u003e\n\t\u003c/head\u003e\n\n\t\u003cbody\u003e\n\t\t\u003cdiv class=\"grid place-items-center h-screen content-center\"\u003e\n\t\t\t\u003cButton\u003eTailwind Button in Astro!\u003c/Button\u003e\n\t\t\t\u003ca href=\"/markdown-page\" class=\"p-4 underline\"\u003eMarkdown is also supported...\u003c/a\u003e\n\t\t\u003c/div\u003e\n\t\u003c/body\u003e\n\u003c/html\u003e\n", "Please open an issue: https://astro.build/issues"],
  "mappings": ";;;;;;;;;;;;;;;;;AAAA,AAAG,ACAH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBDQC,CAAC,IAAD,CAAK,KAAM,IAAX,CAAe;AAAA,CACd,CAAC,IAAD,CAAK;AAAA,EACJ,CAAC,IAAD,CAAK,QAAS,OAAd,CAAuB;AAAA,EACvB,CAAC,IAAD,CAAK,KAAM,UAAX,CAAqB,QAAS,oBAA9B,CAAoD;AAAA,EACpD,CAAC,IAAD,CAAK,IAAK,MAAV,CAAgB,KAAM,eAAtB,CAAqC,KAAM,cAA3C,CAA2D;AAAA,EAC3D,CAAC,IAAD,CAAK,KAAM,WAAX,iBAA+B,eAAT,aAAtB,CAAkD;AAAA,EAClD,CAAC,KAAD,CAAM,mBAAqB,QAAM;AAAA,CACjC,ACfH,gCDeQ;AAAA;AAAA,CAEN,CAAC,IAAD,CAAK;AAAA,EACJ,CAAC,GAAD,CAAI,MAAO,iDAAX,CAA4D;AAAA,GAC3D,sCAAC,MAAD,ACnBJ,+BDmBW,ACnBX,4BDmBsC,EAAO;AAAA,GACzC,CAAC,CAAD,CAAE,KAAM,gBAAR,CAAwB,MAAO,eAA/B,CAA8C,6BAA+B,IAAE;AAAA,EAC/E,MAAI;AAAA,CACL,OAtBH,ACAA;AAAA;AAAA;",
  "names": []
}

In 0.25.0:

{
  "version": 3,
  "sources": ["/Users/bjorn/Work/oss/astro/examples/with-tailwindcss/src/pages/index.astro"],
  "sourcesContent": ["---\n// Component Imports\nimport Button from '../components/Button.astro';\n\n// Full Astro Component Syntax:\n// https://docs.astro.build/core-concepts/astro-components/\n---\n\n\u003chtml lang=\"en\"\u003e\n\t\u003chead\u003e\n\t\t\u003cmeta charset=\"utf-8\" /\u003e\n\t\t\u003cmeta name=\"viewport\" content=\"width=device-width\" /\u003e\n\t\t\u003clink rel=\"icon\" type=\"image/svg+xml\" href=\"/favicon.svg\" /\u003e\n\t\t\u003cmeta name=\"generator\" content={Astro.generator} /\u003e\n\t\t\u003ctitle\u003eAstro + TailwindCSS\u003c/title\u003e\n\t\u003c/head\u003e\n\n\t\u003cbody\u003e\n\t\t\u003cdiv class=\"grid place-items-center h-screen content-center\"\u003e\n\t\t\t\u003cButton\u003eTailwind Button in Astro!\u003c/Button\u003e\n\t\t\t\u003ca href=\"/markdown-page\" class=\"p-4 underline\"\u003eMarkdown is also supported...\u003c/a\u003e\n\t\t\u003c/div\u003e\n\t\u003c/body\u003e\n\u003c/html\u003e\n"],
  "mappings": ";;;;;;;;;;;;;;;;;AAAA,AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAQC,CAAC,IAAD,CAAK,KAAM,IAAX,CAAe;AAAA,CACd,CAAC,IAAD,CAAK;AAAA,EACJ,CAAC,IAAD,CAAK,QAAS,OAAd,CAAuB;AAAA,EACvB,CAAC,IAAD,CAAK,KAAM,UAAX,CAAqB,QAAS,oBAA9B,CAAoD;AAAA,EACpD,CAAC,IAAD,CAAK,IAAK,MAAV,CAAgB,KAAM,eAAtB,CAAqC,KAAM,cAA3C,CAA2D;AAAA,EAC3D,CAAC,IAAD,CAAK,KAAM,WAAX,iBAA+B,eAAT,aAAtB,CAAkD;AAAA,EAClD,CAAC,KAAD,CAAM,mBAAqB,QAAM;AAAA,CACjC,AAfH,gCAeQ;AAAA;AAAA,CAEN,CAAC,IAAD,CAAK;AAAA,EACJ,CAAC,GAAD,CAAI,MAAO,iDAAX,CAA4D;AAAA,GAC3D,sCAAC,MAAD,sBAnBJ,SAmBW,yBAnBX,GAmBsC,EAAO;AAAA,GACzC,CAAC,CAAD,CAAE,KAAM,gBAAR,CAAwB,MAAO,eAA/B,CAA8C,6BAA+B,IAAE;AAAA,EAC/E,MAAI;AAAA,CACL,OAtBH;AAAA;AAAA;",
  "names": []
}

There's an extra astro:runtime source in the sourcemap, and I can't seem to find where that came from. cc @natemoo-re

@natemoo-re
Copy link
Member

Thanks for investigating @bluwy! I've opened a PR to remove this on the compiler side. withastro/compiler#568

@bluwy
Copy link
Member

bluwy commented Oct 17, 2022

Closing as the PR has been merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

No branches or pull requests

8 participants