import dotenv from 'dotenv'; dotenv.config(); console.log(process.env.MY_KEY); this…
Jump to turn (11)
- 1import dotenv from 'dotenv'; dotenv.config(); console.log(process.env.MYKEY); th
- 2BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules
- 3what to use in react typescript when dotenv does't work?
- 4ERROR in ./nodemodules/dotenv/lib/main.js 2:13-28 Module not found: Error: Can't
- 5how to install with yarn and where to put resolve?
- 6it react project i don't see webpack file?
- 7shorter way
- 8it ts files?
- 9the project is in typescript no js files
- 10write short solution
- 11it react project
- User
import dotenv from 'dotenv';
dotenv.config(); console.log(process.env.MY_KEY); this doen't work some webpack errors?
- Assistant
As an AI language model, I am not able to determine the exact error without further information. However, you may want to ensure that you have installed the necessary dependencies for using dotenv and webpack. Additionally, make sure that your .env file is correctly formatted and that it resides in the root directory of your project. You can also try restarting your webpack server after making changes to your configuration files.
- User
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it.