Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Yarn start throwing error wrt .env #872

Open
ChariseWalraven opened this issue Nov 13, 2018 · 7 comments
Open

Yarn start throwing error wrt .env #872

ChariseWalraven opened this issue Nov 13, 2018 · 7 comments

Comments

@ChariseWalraven
Copy link

ChariseWalraven commented Nov 13, 2018

Problem

Yarn start is throwing an error

Replication steps

  1. yarn create slate-theme my-new-theme
  2. cd my-new-theme
  3. yarn && yarn start

More Information

Node -v
v10.7.0

yarn -v
1.12.1

slate
zsh: permission denied: slate

This is what my .env file looks like:

SLATE_STORE=faircotton.myshopify.com


SLATE_PASSWORD={{password}}


SLATE_THEME_ID=43794399294


SLATE_IGNORE_FILES=config/settings_data.json

This is the error message:

✔  Compiled successfully in 2.912s!
Some values in environment 'default' are invalid:
- Error: SLATE_STORE must be a valid .myshopify.com URL
- Error: SLATE_PASSWORD can only contain numbers and letters
- Error: SLATE_THEME_ID can be set to 'live' or a valid theme ID containing only numbers
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@huguestennier
Copy link
Contributor

Unable to reproduce with the exact same setup, but i'm able to reproduce some errors if I rename my .env file to something else like .envtest.

Make sure your .env file is named properly and that it sits at the top level of your site

@ChariseWalraven
Copy link
Author

ChariseWalraven commented Nov 15, 2018

Hi @huguestennier! Thanks for the suggestion, however it is in the root and it is named .env

@jakekapitz
Copy link

I've received the same error in the last few days also, though in slightly different circumstances. I have both .env.production and .env.development in the project root, hitting yarn start throws the invalid error. It all works perfectly fine if I remove the ".development" or ".production".

@jonas-davidson
Copy link

I've receiving this same error @ChariseWalraven . Any solutions since your original post? I've searched everywhere but no luck.

@alishagarric
Copy link

If you have a .env file that is specific to development or production you have to specify that in your command. So instead of just doing yarn start do yarn start --env=development or whatever yours is

@ThaoD5
Copy link

ThaoD5 commented Nov 14, 2019

I am encountering the exact same issue, tried :

  • default .env file, ran yarn start
  • custom .env.development, ran yarn start --env=development

Same formatting in my .env file than OP and can't find any solution to this so far

@ThaoD5
Copy link

ThaoD5 commented Nov 14, 2019

Somehow managed to get rid of this issue by rebooting.
I tried those manipulation after having installed mkcert to work with Slate "locally", and I guess something went wrong at some point, so if someone encounters a similar issue, give your computer a reboot, might fix the issue ( strangely )

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants