Gwaggli
WWasp-lang
•Created by Jamesco on 10/2/2024 in #đŸ™‹questions
CORS issue
@Jamesco Happy I could help!
Sorry, sadly I dont know lightning so I am not sure. But looks like either some other env variables are wrong and pointing to localhost or you have localhost somewhere in your code hardcoded which is probably not how it should be. But hard to tell without seeing the code and not knowing the framework đŸ˜„
20 replies
WWasp-lang
•Created by Jamesco on 10/2/2024 in #đŸ™‹questions
CORS issue
And sidenote: you probably dont want to include the quotes(") in your variable value
20 replies
WWasp-lang
•Created by Jamesco on 10/2/2024 in #đŸ™‹questions
CORS issue
Quickly checked:
https://client-production-01be.up.railway.app/ this does not exist. So your env variable is false
https://coverlettergpt.netlify.app/ and https://66fcdba5764d005f23d60460--coverlettergpt.netlify.app/ seem to work but i guess you prefer the first one.
So you need to set WASP_WEB_CLIENT_URL=https://coverlettergpt.netlify.app/
20 replies
WWasp-lang
•Created by Jamesco on 10/2/2024 in #đŸ™‹questions
CORS issue
@Jamesco isnt your frontend url: Ihttps://66fcdba5764d005f23d60460--coverlettergpt.netlify.app/ ?
Here you have "https://client-production-01be.up.railway.app/" set as WASP_WEB_CLIENT_URL
And you also have a variable ALLOWED_CORS_ORIGINS which i dont know what it does (so probably its something you came up with?) and its pointing to another url again đŸ˜„
20 replies
WWasp-lang
•Created by Jamesco on 10/2/2024 in #đŸ™‹questions
CORS issue
Thanks Kapa!
@Jamesco You might want to check if you need to manually set the env variables on your server. They might get set automatically on your railway server but i am not sure.
20 replies
WWasp-lang
•Created by Jamesco on 10/2/2024 in #đŸ™‹questions
CORS issue
Did you specify the frontend url env variable on the server? It is used to allow this url to make requests for your server.
@kapa.ai could this resolve the issue and if so can you provide more detailed information?
20 replies
WWasp-lang
•Created by Gwaggli on 9/29/2024 in #đŸ™‹questions
Different Root Components for Pages
Thank you for the update and the ideas! much apreciated đŸ™‚
9 replies
WWasp-lang
•Created by Gwaggli on 9/29/2024 in #đŸ™‹questions
Different Root Components for Pages
Yeah i think the linked github issue is pretty much what i was describing! So kinda curious what the state of this discussion is. Thanks for the idea and interested in hearing what the most recent state of development is đŸ™‚
9 replies
WWasp-lang
•Created by cmilazzo on 9/27/2024 in #đŸ™‹questions
add react component
You might want to try to use a relative import instead?
Not sure but i dont think you are supposed to use the @src alias in your typescript/javascript files.
@kapa.ai do you think this could resolve the issue?
23 replies
WWasp-lang
•Created by Sven on 9/12/2024 in #đŸ™‹questions
Recommendation for deploying and database
Normally you run multiple databases side by side. A Development Database where you experiment, develop your stuff and make mistakes. And once you are happy with your adjustments you deploy the changes to prod (software and database) so the schema changes are applied to the prod database as well. The data stored inside the databases are not synchronized by default. (you can - every now and then - dump your prod data to your dev environment to develop against somewhat real data [but data privacy might be an issue in that regard])
33 replies
WWasp-lang
•Created by ArDev on 9/9/2024 in #đŸ™‹questions
Why is my deployed project ui different to my local ui?
@ArDev Just to rule it out: Most browsers safe your zoom level per host. So maybe you are zoomed in on localhost or zoomed out on the production environment? hit cmd+0 (ctrl+0 on windows) to make sure you are on 100% on both devices. And did you check whether the issue occurs on different browsers and devices (different pc) as you said on mobile its working just fine.
30 replies
WWasp-lang
•Created by linus on 9/9/2024 in #đŸ™‹questions
Trouble with forms...
@linus https://mui.com/material-ui/react-select/ Material UI offers this. But i dont know if this is interesting for you to use.
8 replies
WWasp-lang
•Created by devrim on 8/21/2024 in #đŸ™‹questions
Tutorial API implementation doesn't work for me.
@prof_mark No, they should not be passed to the server environment. You need to set them in your different environments manually. This also allows you to define them per environment. If for example you set up a staging/test environment with a different url
test.yourawesomeapp.com
you would then use this url on your staging server and yourawesomeapp.com
on your production server. Similar with other keys you might want to differentiate between environments. And regarding the fly deploy
command: At some point you will want to setup some sort of CI/CD, where the deployment is triggered by for example github actions. So your local .env
file would be lost anyways.30 replies
WWasp-lang
•Created by devrim on 8/21/2024 in #đŸ™‹questions
Tutorial API implementation doesn't work for me.
I am not using google oAuth so not sure, but seems like you are missing some env variables? Does it work locally, right? Did you set the env variables in fly.io as well? Personal/Videoupdate-server/Secrets? (https://fly.io/apps/videoupdate-server/secrets)
30 replies
WWasp-lang
•Created by devrim on 8/21/2024 in #đŸ™‹questions
Tutorial API implementation doesn't work for me.
If you used the standard wasp config and deployed it to fly.io your backend server address will look probably something like this: https://<yourAppname>-server.fly.dev
So for example:
https://devrim-server.fly.dev/api
30 replies
WWasp-lang
•Created by devrim on 8/21/2024 in #đŸ™‹questions
Tutorial API implementation doesn't work for me.
Depends where you deploy your backend. The API is part of your backend server. So you need to use the url of your backend server.
30 replies
WWasp-lang
•Created by Gwaggli on 8/17/2024 in #đŸ™‹questions
Custom Type Declarations
@sodic https://github.com/Brakeable/wasp-custom-typings-example
Here you go!
Steps to reproduce:
1.
wasp build
2. cd .wasp/build/web-app
&& npm run build
This fails because of the missing typing while wasp start
works just fine
When you then uncomment the import import from 'mui'
line in the MainPage.tsx
file and retry the steps above, the build progresses further and spits out another error, but the missing typing error is gone. (sorry would need to investigate further what that other error means and how to fix it)10 replies
WWasp-lang
•Created by Gwaggli on 8/17/2024 in #đŸ™‹questions
Custom Type Declarations
Yeah sure, i will setup an example soon! But probably it will be resolved with the custom tsconfig file that is planned for the next release, right?
10 replies
WWasp-lang
•Created by Gwaggli on 8/17/2024 in #đŸ™‹questions
Custom Type Declarations
Alright, I could workaround this by importing my
mui.ts
file in my root component and there force typescript to pick it up. I guess a cleaner solution is dependent on the issue Kapa mentioned?10 replies
WWasp-lang
•Created by Ricardo Batista on 7/18/2024 in #đŸ™‹questions
Undefined identifier: User
Hm somehow my answer seems to got lost. Sorry. I was able to single out the error in a sandbox and then resolve it. Thank you anyways! It was indeed a Typescript error that was let through before the update and caught with it.
31 replies