nodejs-notes-app
nodejs-notes-app copied to clipboard
I'm getting this error when i try to execute it
import { config } from "dotenv"; ^^^^^^ SyntaxError: The requested module 'dotenv' does not provide an export named 'config'
import { config } from "dotenv"; ^^^^^^ SyntaxError: The requested module 'dotenv' does not provide an export named 'config'
need create .env file, and run npm install
https://www.youtube.com/watch?v=-bI0diefasA&t=8025s
dotenv.config({ path: './.env'}) you can use this command but make sure your main app.js should be in same directory as .env file
create .env file