Closed jauntyjocularjay closed 5 months ago
does this format work for you:
import { config } from "dotenv";
config();
see this thread: https://github.com/motdotla/dotenv/issues/89#issuecomment-1962908568
Interesting, I am not using nextjs to my knowledge, unless Phaser uses that under the hood.
does this format work for you:
import { config } from "dotenv"; config();
Same result.
Console:
Uncaught TypeError: Failed to resolve module specifier "dotenv". Relative references must start with either "/", "./", or "../".
It doesn't look like Phaser uses NextJS under the hood. I don't have a next.config.js file to modify.
I still get "process not defined"
Expected behavior:
Import dotenv using the instructions in the readme.md
Actual Behavior:
Yields an error in Chrome
notes:
Error files: I have preserved the error in a branch of my project. IDE: VSCode Browser: Chrome Version 122.0.6261.129 (Official Build) (64-bit) OS: Windows 10