snaps icon indicating copy to clipboard operation
snaps copied to clipboard

Environement variable error: process is not defined

Open Janaka-Steph opened this issue 1 year ago • 2 comments

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

Janaka-Steph avatar Apr 24 '24 22:04 Janaka-Steph

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

Montoya avatar Apr 25 '24 13:04 Montoya

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

Janaka-Steph avatar Apr 25 '24 16:04 Janaka-Steph