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

[Bug] yarn run build and yarn run start not working on Windows Machine #422

Closed
wxharry opened this issue Jul 24, 2022 · 5 comments
Closed
Assignees
Labels
kind/bug Category issues or prs related to bug. priority/high Very important, need to be worked with soon but not very urgent
Milestone

Comments

@wxharry
Copy link
Collaborator

wxharry commented Jul 24, 2022

Description

In the commit fix: exsiting way to write process.env.XXX does not work, we changed the way to specify environment variables. However, the wary of adding the env variables directly to yarn run build and yarn run start doesn't work for windows Machine. Catch error:
image
becuase we are using windows cmd and the commands are different.

How do we solve this?

@wxharry wxharry changed the title [Dev] yarn run build and yarn run start not working on Windows Machine [chore] yarn run build and yarn run start not working on Windows Machine Jul 24, 2022
@tyn1998
Copy link
Member

tyn1998 commented Jul 25, 2022

Hi, @wxharry, it was a mistake. Thank you for reporting it!

Before #274:

"scripts": {
"start": "node utils/webserver.js",
"watch": "cross-env NODE_ENV=development node utils/build.js",
"watch:mock": "cross-env NODE_ENV=development MOCK=true node utils/build.js",
"web-ext": "web-ext run --target=chromium",
"build": "cross-env NODE_ENV=production node utils/build.js",
"prettier": "prettier --write '**/*.{js,jsx,css,html}'"
},

After #274, all things that related to cross-env are removed because they are not needed anymore until #384 comes out. But apparently I ignored the different shell syntax between windows cmd/powershell and unix-like bash/zsh/fish/git-bash then.

We should use cross-env again.

@tyn1998 tyn1998 added the kind/bug Category issues or prs related to bug. label Jul 25, 2022
@tyn1998
Copy link
Member

tyn1998 commented Jul 25, 2022

What shell did you use?

@tyn1998 tyn1998 added the priority/high Very important, need to be worked with soon but not very urgent label Jul 25, 2022
@tyn1998 tyn1998 added this to the 1.6.4 milestone Jul 25, 2022
@wxharry
Copy link
Collaborator Author

wxharry commented Jul 25, 2022

windows cmd

@tyn1998
Copy link
Member

tyn1998 commented Jul 25, 2022

Now I know more about git bash, "bash" is more important.

@wxharry
Copy link
Collaborator Author

wxharry commented Jul 25, 2022

/self-assign

@wxharry wxharry mentioned this issue Jul 25, 2022
5 tasks
@tyn1998 tyn1998 changed the title [chore] yarn run build and yarn run start not working on Windows Machine [Bug] yarn run build and yarn run start not working on Windows Machine Jul 26, 2022
@wxharry wxharry closed this as completed Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Category issues or prs related to bug. priority/high Very important, need to be worked with soon but not very urgent
Projects
None yet
Development

No branches or pull requests

2 participants