sanityClient is not reading process.env variable
Unanswered
Cape lion posted this in #help-forum
Cape lionOP
hello, I have embedded sanity in next js webapp. I am trying to create a new document via website. I have the token in my .env.local file, for some reason sanityClient.ts is unable to read the token from process.env.... any suggestions?
2 Replies
Dunker
try process.env.token || ""
or if you are using TS token as string