slate
slate copied to clipboard
Yarn start throwing error wrt .env
Problem
Yarn start is throwing an error
Replication steps
-
yarn create slate-theme my-new-theme
-
cd my-new-theme
-
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.
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
Hi @huguestennier! Thanks for the suggestion, however it is in the root and it is named .env
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".
I've receiving this same error @ChariseWalraven . Any solutions since your original post? I've searched everywhere but no luck.
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
I am encountering the exact same issue, tried :
- default
.env
file, ranyarn start
- custom
.env.development
, ranyarn start --env=development
Same formatting in my .env file than OP and can't find any solution to this so far
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 )