Running next dev with Lerna ignores .env.development
      #44884
    
    
        Labels
        
  
            
              template: bug
  A user has filled out the bug report template. Issue needs triaging 
        
      
Verify 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
yarn bootstrapyarn devDescribe the Bug
When running
next devfrom a package inside Lerna monorepo, it ignores.env.developmentfile 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 devinside thepackages/next-appfolder, it would still work as expected.Expected Behavior
.env.developmentfile values are respected and resolved correctlyWhich browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: