MetaMask / snaps

Extend the functionality of MetaMask using Snaps
https://metamask.io/snaps/
Other
711 stars 546 forks source link

Environement variable error: process is not defined #2361

Open Janaka-Steph opened 2 months ago

Janaka-Steph commented 2 months ago

Using env var directly in snap code throw an error const myApiKey = process.env.MY_API_KEY; MetaMask - RPC Error: process is not defined

Montoya commented 2 months ago

Hi, are you following the steps described here? https://docs.metamask.io/snaps/how-to/use-environment-variables/

Janaka-Steph commented 2 months ago

Yes, I don't see what I can miss, the steps are very basic.