Open dhouhamaa opened 4 years ago
Have you made sure to run “yarn build” before running “yarn start”. Yarn start requires the build files that are created in var/www/.
It is an honest mistake, but I’m pretty sure that is your issue
@AntoniErdeg Yes I'am sure am running "yarn build" before "yarn start" because the vue-storefront.sh script runs these commands sequentially when the env is different from dev
@dhouhamaa did you tried this ecosystem configuration https://github.com/DivanteLtd/vue-storefront/issues/4191#issuecomment-602535658 ?
@dhouhamaa @gibkigonzo I tested this issue on my project. I didn’t encounter any issues. I have no idea problem you’re currently encountering.
If you’re using gitBash - it is because you don’t have the correct permissions for it to start correctly. Linux and Mac Command in-line if you’re the administrator. Automatically, runs the process as administrator.
If you’re using windows. Don’t use gitBash to run “npm start” as it will error. This is due to the permission of .ts executer ts_node as it needs administrator permissions to install and execute correctly.
Try this: Right click on cmd -> run as administrator -> cd (to project path) -> Yarn start (you do still need to ensure you have ran “yarn build” first)
Let me know if that fixes your issue. That was my issue once. Even as the administrator you still will need to run cmd as administrator on windows for it to work correctly. Give that a try for me and let me know how it goes 👍
@gibkigonzo Yes I did but with no luck @AntoniErdeg Locally in my linux machine all is working fine and yarn start executes successfully but under kubernetes not , and I don't think it is a permission issue in this situation .
I have the same issue in docker container.
I solved it - temporary - through new line in package.json
"start:production": "cross-env NODE_ENV=production TS_NODE_PROJECT=\"tsconfig-build.json\" node -r ts-node/register ./core/scripts/server",
This is duplicated start:inspect without --inspect flag. Also changed in file /vue-storefront.sh yarn start to yarn start:production
Current behavior
On kubenretes all works fine when using the dev env ( running yarn dev ) but once I change the env variable to production or test , it runs "yarn start" but it is not successfully executed and I get this error although it runs successfully in linux machine and macOS machines.
Expected behavior
The service should boot and I should be able to see the application working from the browser on port 3000
Steps to reproduce the issue
By default the env is set to dev and running vue-storefront.sh will run yarn dev successfully . all you need to to is to change the env to test or production for example .
Can you handle fixing this bug by yourself?
NO
Additional information
I can see from this issue that there is also a problem on other machines vuestorefront/vue-storefront#4454 and vuestorefront/vue-storefront-1#349