nodejs-notes-app icon indicating copy to clipboard operation
nodejs-notes-app copied to clipboard

I'm getting this error when i try to execute it

Open Ber1984 opened this issue 3 years ago • 3 comments

import { config } from "dotenv"; ^^^^^^ SyntaxError: The requested module 'dotenv' does not provide an export named 'config'

Ber1984 avatar Oct 01 '22 16:10 Ber1984

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

moferrin avatar Nov 30 '22 00:11 moferrin

dotenv.config({ path: './.env'}) you can use this command but make sure your main app.js should be in same directory as .env file

Rabiyya1302 avatar Dec 03 '23 09:12 Rabiyya1302

create .env file

Saif-Arshad avatar Mar 28 '24 11:03 Saif-Arshad