79572524

Date: 2025-04-14 07:05:18
Score: 1.5
Natty:
Report link

I tried accessing the pusher api key in my Next.js project like this

process.env.PUSHER_APP_KEY

but received the same error but when I replaced the value with the litral value it worked just fine but due to obvious security reasons this cannot be used like this. First doubt was that I might be making some kind of typo but it wasn't the case, the following helped me so replace the above snippet with the below

`${process.env.PUSHER_APP_KEY}`

This solved my issue I hope helps other facing the same issue. Happy coding.

Reasons:
  • Whitelisted phrase (-1): it worked
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): facing the same issue
  • Low reputation (1):
Posted by: deepak mahto