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

[✅] fixes for all "Error: Missing Qwik City Env Data" #6237

Open
PatrickJS opened this issue May 6, 2024 · 8 comments
Open

[✅] fixes for all "Error: Missing Qwik City Env Data" #6237

PatrickJS opened this issue May 6, 2024 · 8 comments

Comments

@PatrickJS
Copy link
Member

PatrickJS commented May 6, 2024

(If you never seen this error then ignore this)

This is a live thread for different ways to fix Error: Missing Qwik City Env Data which can be caused by many different errors.

Error: Missing Qwik City Env Data
    at AsyncFunction.Aa (file:///Temp/server/q-DNo4f3Gn.js:15:11868)
    at AsyncFunction.dc (file:///Temp/server/q-DNo4f3Gn.js:10:5874)
    at AsyncFunction.V (file:///Temp/server/q-DNo4f3Gn.js:10:5808)
    at file:///Temp/server/q-DNo4f3Gn.js:15:2935
    at q (file:///Temp/server/q-DNo4f3Gn.js:7:1510)
    at file:///Temp/server/q-DNo4f3Gn.js:15:2804
    at file:///Temp/server/q-DNo4f3Gn.js:8:4693
    at Qt (file:///Temp/server/q-DNo4f3Gn.js:7:1430)
    at Et (file:///Temp/server/q-DNo4f3Gn.js:8:4686)
    at wi (file:///Temp/server/q-DNo4f3Gn.js:8:9122)

Your error might be one of the many fixes listed below

if any of these fixed your issue add a reaction to this post. Otherwise add a comment if you're still stuck

1. cookie issue

"I faced the same issue, but it was only due to the hostname/domain (localhost) having data of previous app stored in it. It solved itself when I cleared cookies and site data"

clear cookies and site data

2. accidentally importing server-only packages on the client

you might have accidentally imported a server-only package onto the client during development.

move server-only code into routeLoader$ or server$

3. deps in "dependencies" not in "devDependencies"

you might have dependencies in "dependencies" inside package.json that are being excluded. Move the packages into "devDependencies" unless they're server-only packages or packages with production binary e.g "bcrypt"

move app dependencies in package.json into "devDependencies"

4. when resizing window on local dev

sometimes when installing a new qwik app you may see this error when resizing the window. This is sometimes caused when the source-maps aren't loading

restart the dev server (comment here and ping me if this doesn't work)

5. partytown install

when installing qwik party town there can be an error with the QwikPartyTown component

remove <QwikPartytown forward={['dataLayer.push', 'fbq']} /> in root.tsx

@PatrickJS PatrickJS added COMP: docs Improvements or additions to documentation STATUS-1: needs triage New issue which needs to be triaged and removed COMP: docs Improvements or additions to documentation STATUS-1: needs triage New issue which needs to be triaged labels May 6, 2024
@PatrickJS PatrickJS changed the title [🫡] fixes for all "Error: Missing Qwik City Env Data" [✅] fixes for all "Error: Missing Qwik City Env Data" May 6, 2024
@PatrickJS PatrickJS pinned this issue May 6, 2024
@Nefcanto
Copy link

Nefcanto commented May 6, 2024

@PatrickJS, thank you for creating this thread. But I think it's not a good idea to expect developers to memorize the list you presented. The correct way is to give correct messages. Please let me repeat myself:

The right way is to give correct error messages

That's the first line for troubleshooting and debugging.

@PatrickJS
Copy link
Member Author

PatrickJS commented May 6, 2024

yes, this is only temporary until we track down each error and fix them. The error itself is triggered more often by other errors (which we need to correctly capture)

@PatrickJS PatrickJS unpinned this issue May 8, 2024
@seanperez-xyz
Copy link

happens all the time in firefox... if you open up devtools automatically does that

@seanperez-xyz
Copy link

seanperez-xyz commented May 24, 2024

there was alot of errors before in dev mode that dont pop up anymore... they still do in the console but before there was an error about some image thing that the dev tools injects some container ( it would mess up my css all the time) maybe whatever was done to mute that started throwing this errors ?

  • i like adding grid directly to the body... so i remember that error it was like a container that was like 0px x 0px would sit up in the top left and actually had a flag (tooltip-ish ordeal) that would always be there saying something about image needed width height... but even if you had no images ( pertained to the container itself) it would be there... but that thing would mess up my whole css, but I notice the console, still logs the error... but that little "flag "doesnt show up on the top left, but def when you open up dev tools in firefox the second you open it up it throws the qwik.env error ... something strange tho when in dev mode the vite and qwik trys to throw a bunch of stuff in which is ignored by firefox ( like all the -web kit stuff) .. just kind of seems like thats an "Env" thing + that new qwik.env.d.ts file I keep asking what its about but no one knows

@PatrickJS
Copy link
Member Author

What's the reproduction? Is it just new qwik app 1.5.5 and open dev mode in Firefox

@seanperez-xyz
Copy link

What's the reproduction? Is it just new qwik app 1.5.5 and open dev mode in Firefox

well i just got 1.5.5 and it does the same thing but 15.4 did it do

@PatrickJS
Copy link
Member Author

@JerryWu1234 do you have time to look into this bug?

@JerryWu1234
Copy link
Contributor

@JerryWu1234 do you have time to look into this bug?

Ok I can do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants