Closed rjgallego closed 3 years ago
Thank you for opening this bug and your suggestion to solve it @rjgallego :+1:
I'll try this command on linux. Ideally, we would like to have a single script that runs both on windows an *nix OSes.
https://www.npmjs.com/package/run-script-os
but since it's coming from me, you better think twice about using it. @hanxiao was always been worried about the negative impact of neurodiversity on jina ai, so I don't know :P
@DavidSanwald, thank you for your suggestion. I'll checkout run-script-os. Initially I had cross-env in mind to solve this.
Meanwhile, @rjgallego, I've created a branch with a temporary solution for this. Please try it out and tell me if it works for you. You can pull my changes with the following commands.
git checkout -b Roshanjossey-fix/start-dashboard-error-on-windows master
git pull https://github.com/Roshanjossey/dashboard.git fix/start-dashboard-error-on-windows
If we see a pattern of these problems repeating, I'll spend some time to try and use one of the packages suggested above.
@Roshanjossey I pulled your branch, the start-dashboard script brings up the dashboard but it's producing the below syntax error:
@rjgallego, this will happen if the major versions of @emotion/react @emotion/core and @emotion/styled aren't the same. I've seen this when @emotion/react version was 11.x.x when @emotion/core version was 10.x.x.
Please try running npm install
I'll check package-lock.json on my branch to see if versions are correct.
I checked package-lock.json and versions looks alright. Make sure you run npm install
Thanks, that fixed it. I'm able to run the dashboard with the same start-dashboard script now.
Thank you for your feedback @rjgallego.
Describe the bug Running
npm run start-dashboard
script produces an error on Windows when trying to runREACT_APP_TARGET=dashboard
Have you solved it? If so, let us know how! Windows has to use the SET command to set environment variables. Below script works on my machine for starting the dashboard.
"start-dashboard": "SET \"REACT_APP_TARGET=dashboard\" && react-scripts start"
Thinking this command could be added to the package.json file as a separate script, something like
"start-dashboard_win"
.Screenshots and logs