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

Mini-Oxygen shouldn't blow up when .env is missing from the local dir #427

Closed
jplhomer opened this issue Feb 1, 2023 · 0 comments · Fixed by #448
Closed

Mini-Oxygen shouldn't blow up when .env is missing from the local dir #427

jplhomer opened this issue Feb 1, 2023 · 0 comments · Fixed by #448

Comments

@jplhomer
Copy link
Contributor

jplhomer commented Feb 1, 2023

Yeah people can do whatever they want with this, so we shouldn't blow up when .env is missing from the local dir.

> shopify hydrogen dev --entry ./server


🏁 Initial build: 479.869ms
🚥 MiniOxygen server started at http://localhost:3000

/Users/joshlarson/src/github.com/Shopify/h2/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
        throw ex;
        ^

[Error: ENOENT: no such file or directory, open '/Users/joshlarson/src/github.com/Shopify/h2/templates/hello-world/.env'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Users/joshlarson/src/github.com/Shopify/h2/templates/hello-world/.env'
}
frandiox added a commit that referenced this issue Feb 7, 2023
@jplhomer jplhomer mentioned this issue Feb 7, 2023
frandiox added a commit that referenced this issue Feb 8, 2023
* Add package manager to build warning

* Increase the lines shown in check-routes command

* Do not throw in non-git repos

* Do not read .env when missing. Closes #427

* Add readme to templates

* Update templates/demo-store/README.md

Co-authored-by: Matt Seccafien <matt.seccafien@shopify.com>

* Update based on feedback

* Tweak warnings

* Update packages/cli/src/commands/hydrogen/build.ts

Co-authored-by: Josh Larson <jplhomer@gmail.com>

---------

Co-authored-by: Matt Seccafien <matt.seccafien@shopify.com>
Co-authored-by: Josh Larson <jplhomer@gmail.com>
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