EthereaL
EthereaL3w ago

Deno not found in nextjs15 client component

Building a small scale website with Nextjs 15 and Firebase. I think the issue is that Deno.env.get() works on server components but when its a client component, it doesnt work and it throws this error "Deno is not defined"
No description
4 Replies
kenos
kenos3w ago
the deno namespace doesn't exist in browsers
EthereaL
EthereaLOP3w ago
ah will there be plans for it to be implemented in browsers in the future? and would process.env.XXX be the recommended way to go for deno projects atm or are there better methods
2saturdayscode
Never used NextJS but if you use process.env.NEXT_PUBLIC_VARIABLE_NAME it should work because probably Next bundler will replace them in the build step of the client components
kenos
kenos3w ago
No, the deno namespace has things you would not find in a browser environment

Did you find this page helpful?