How about use require('dotenv').config({path:__dirname+'/./../../.env'})
?
Your problem seems to be the execution path.
More Related Contents:
- async/await implicitly returns promise?
- Node.js on multi-core machines
- Difference between microtask and macrotask within an event loop context
- How do I update/upsert a document in Mongoose?
- How to access the request body when POSTing using Node.js and Express?
- What’s the cause of the error ‘getaddrinfo EAI_AGAIN’?
- Nodemailer with Gmail and NodeJS
- How to use redis PUBLISH/SUBSCRIBE with nodejs to notify clients when data values change?
- Trying to use the DOMParser with node js
- node-request – Getting error “SSL23_GET_SERVER_HELLO:unknown protocol”
- How do we or can we use node modules via npm with Meteor?
- ES6 immediately invoked arrow function
- puppeteer: how to wait until an element is visible?
- Accessing EJS variable in Javascript logic
- Good beginners tutorial to socket.io? [closed]
- Using node.js’s File System functions from a browser
- Replace a string in a file with nodejs
- In the `import` syntax of ES6, how is a module evaluated exactly?
- Curly brackets (braces) in Node.js ‘require’ statement
- Checking if a message was sent from a DM not working
- Spawn and kill a process in node.js
- JavaScript dependency management: npm vs. bower vs. volo [closed]
- What is the difference between id and _id in mongoose?
- ES6 import from root
- How to create a sleep/delay in nodejs that is Blocking?
- JavaScript asynchronous programming: promises vs generators
- Property ‘XXX’ does not exist on type ‘CombinedVueInstance’
- How to assign a domain name to node.js server? [duplicate]
- Manage multiple tabs (but same user) in socket.io
- ESLint: “error Parsing error: The keyword ‘const’ is reserved”