Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotenv not working in online editors (like Replit) #692

Closed
alainQtec opened this issue Nov 4, 2022 · 0 comments · Fixed by #693
Closed

dotenv not working in online editors (like Replit) #692

alainQtec opened this issue Nov 4, 2022 · 0 comments · Fixed by #693

Comments

@alainQtec
Copy link
Contributor

When I start the frontend:

 npm run start

I get:

Module not found: Error: Can't resolve 'fs' in pathto...Node_Modules\dotenv\main.js ..

Note: This error does not happen when running on my local Pc.

Here's the screenshot from running the same app on replit:

image

I conducted a short search and found this answer, which helped me repair issue by modifying the "./node modules/dotenv/Package.json" file.

It worked, the error was fixed!, but I don't understand why ?!😂, so I'm guessing this is a problem that the dotenv community has to fix to avoid hacks like these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant