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 doesn't work well with parcel #1

Open
wires opened this issue Jul 28, 2019 · 2 comments
Open

dotenv doesn't work well with parcel #1

wires opened this issue Jul 28, 2019 · 2 comments

Comments

@wires
Copy link
Member

wires commented Jul 28, 2019

Server running at http://localhost:1234
⚠️  /Users/wires/h/code/act/node_modules/dotenv/lib/main.js:95:41: Cannot statically evaluate fs argument
  93 |   try {
  94 |     // specifying an encoding returns a string instead of a buffer
> 95 |     const parsed = parse(fs.readFileSync(dotenvPath, { encoding }), { debug })
     |                                         ^
  96 |
  97 |     Object.keys(parsed).forEach(function (key) {
  98 |       if (!process.env.hasOwnProperty(key)) {

but potentially should not be using dotenv for this anyway

@brunowego
Copy link

Related with parcel-bundler/parcel#496

@brunowego
Copy link

@wires take a look at https://parceljs.org/env.html. Parcel comes with dotenv.

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

No branches or pull requests

2 participants