marti
WWasp-lang
•Created by marti on 4/10/2024 in #🙋questions
server env variables cause process is not defined
thank you so much 🙏
27 replies
WWasp-lang
•Created by marti on 4/10/2024 in #🙋questions
server env variables cause process is not defined
No, I imported it from actions
import { sendEmail } from "../../actions/sendEmail";
27 replies
WWasp-lang
•Created by marti on 4/10/2024 in #🙋questions
server env variables cause process is not defined
I got actually
And I followed the docs and did same as they did
import { emailSender } from "wasp/server/email";
So my sendEmail.ts
looks like
But apparently I am doing something wrong. Can you help me?27 replies
WWasp-lang
•Created by marti on 4/10/2024 in #🙋questions
server env variables cause process is not defined
I tried upgrading wasp, but now I get err
😫
27 replies
WWasp-lang
•Created by marti on 4/10/2024 in #🙋questions
server env variables cause process is not defined
yes, that was my thought as well, but nowhere in the client is using
process
and when I track the err in console it leads me to wasp part ->
ApiKey: process.env.SENDGRID_API_KEY,
27 replies
WWasp-lang
•Created by marti on 4/10/2024 in #🙋questions
server env variables cause process is not defined
- I might just start over haha...I have not that manny stuff to c/p
27 replies
WWasp-lang
•Created by marti on 4/10/2024 in #🙋questions
server env variables cause process is not defined
when I did this
curl -sSL https://get.wasp-lang.dev/installer.sh | sh -s -- -v 0.13.1
and when I do wasp start I see error
27 replies
WWasp-lang
•Created by marti on 4/10/2024 in #🙋questions
server env variables cause process is not defined
ok sorry 😄
no terminal error, this error si from browser console
this happened after I replaced dummy email provider with sendgrid
so what I did was
creted
.env.server
in root with SENDGRID_API_KEY=
in main.wasp
I did this
and that's it, after I restarted the server I saw this err27 replies
WWasp-lang
•Created by marti on 4/10/2024 in #🙋questions
server env variables cause process is not defined
The error exactly is what I said above.
Uncaught reference error: process is not defined.
And if I go into the error it is where sendgrid api key is used.
Const emailProvider = {
Type: ‘sendgrid’,
ApiKey: process.env.SENDGRID_API_KEY,
} as const;
27 replies