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

Running next dev with Lerna ignores .env.development #44884

Open
1 task done
blvdmitry opened this issue Jan 14, 2023 · 0 comments
Open
1 task done

Running next dev with Lerna ignores .env.development #44884

blvdmitry opened this issue Jan 14, 2023 · 0 comments
Labels
template: bug A user has filled out the bug report template. Issue needs triaging

Comments

@blvdmitry
Copy link
Contributor

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.2.0: Fri Nov 11 02:04:44 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T8103
Binaries:
Node: 16.15.0
npm: 8.5.5
Yarn: 1.22.11
pnpm: N/A
Relevant packages:
next: 13.1.1
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0

Which area(s) of Next.js are affected? (leave empty if unsure)

No response

Link to the code that reproduces this issue

https://github.com/blvdmitry/next-lerna-env-reproduction

To Reproduce

  • Clone the repo
  • Run yarn bootstrap
  • Run yarn dev

Describe the Bug

When running next dev from a package inside Lerna monorepo, it ignores .env.development file and gets values from .env. When the app starts in the reproduction repo – browser console outputs production env token instead of the test one.

If you run yarn dev inside the packages/next-app folder, it would still work as expected.

Expected Behavior

.env.development file values are respected and resolved correctly

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

@blvdmitry blvdmitry added the template: bug A user has filled out the bug report template. Issue needs triaging label Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
template: bug A user has filled out the bug report template. Issue needs triaging
Projects
None yet
Development

No branches or pull requests

1 participant