Hi @kunalpanchal ,
I'm using your npm package with react js application. it is not working properly.
I followed the below steps,
-
Installed it locally like :

-
In package.json it looks like:

-
Created .env file in the root directory and added below key values
CLIENT_ID=1234
API_KEY=4455
-
My current npm version is :

-
It is greater than v5.2, so I ran the below command.
npx secure-env .env -s SecretkeyHelloWorld
-
After that it is created env.enc file. and I deleted .env file to prevent stealing.
-
I have added below lines in index.js,
let secureEnv = require('secure-env');
global.env = secureEnv({secret:'SecretkeyHelloWorld'});

-
When I hover on packages it shows some warning message:

-
I start the application using below command
npm start
-
The env variables is displaying as undefined:

I also tried REACT_APP as prefix in .env file, still it's not working.
REACT_APP_CLIENT_ID=1234
REACT_APP_API_KEY=4455
Please let me know if I've missed out anything.
Hi @kunalpanchal ,
I'm using your npm package with react js application. it is not working properly.
I followed the below steps,
Installed it locally like :
In package.json it looks like:
Created .env file in the root directory and added below key values
CLIENT_ID=1234API_KEY=4455My current npm version is :
It is greater than v5.2, so I ran the below command.
npx secure-env .env -s SecretkeyHelloWorldAfter that it is created env.enc file. and I deleted .env file to prevent stealing.
I have added below lines in index.js,
let secureEnv = require('secure-env');global.env = secureEnv({secret:'SecretkeyHelloWorld'});When I hover on packages it shows some warning message:
I start the application using below command
npm startThe env variables is displaying as undefined:
I also tried REACT_APP as prefix in .env file, still it's not working.
REACT_APP_CLIENT_ID=1234REACT_APP_API_KEY=4455Please let me know if I've missed out anything.