You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
react-scripts v3.0.0 (also tried with 2.1.8)
env-cmd v9.0.1
I just upgraded packages on an older project and the build stopped working. When I try to run the build script locally in Windows it is showing a "How do you want to open this file" prompt to open the ".env.vnext" file. If I do a plain yarn build, it works as expected.
Here's the script in question: "build:vnext": "env-cmd .env.vnext react-scripts build" => yarn build:vnext
I deleted the node_modules and yarn.lock files and ran yarn install again to make sure there wasn't something weird with package versions. I also tried reverting the react-scripts version back to 2.1.8. Neither of those fixed it.
I then reverted the env-cmd package back to version to 8.0.2, and yarn build:vnext works again.
[EDIT] This might be somewhat related to issue #61, but my scenario is different enough that I figured I'd type it up.
The text was updated successfully, but these errors were encountered:
Kizmar
changed the title
Running build script with env-cmd in windows tries to open the .env file
Running build script with env-cmd in Windows tries to open the .env file
May 8, 2019
The options have changed in v9. You need to pass the -f flag if you want to provide a custom env file path (by default with no -f flag it looks for ./.env file). I will update the Readme to make that more apparent. Thanks for bringing this up. It was not a change I made lightly, but was necessary to better future proof the lib.
react-scripts v3.0.0 (also tried with 2.1.8)
env-cmd v9.0.1
I just upgraded packages on an older project and the build stopped working. When I try to run the build script locally in Windows it is showing a "How do you want to open this file" prompt to open the ".env.vnext" file. If I do a plain
yarn build
, it works as expected.Here's the script in question:
"build:vnext": "env-cmd .env.vnext react-scripts build"
=>yarn build:vnext
I deleted the
node_modules
andyarn.lock
files and ranyarn install
again to make sure there wasn't something weird with package versions. I also tried reverting thereact-scripts
version back to 2.1.8. Neither of those fixed it.I then reverted the
env-cmd
package back to version to 8.0.2, andyarn build:vnext
works again.[EDIT] This might be somewhat related to issue #61, but my scenario is different enough that I figured I'd type it up.
The text was updated successfully, but these errors were encountered: