I want to run a React project in my Windows (as a virtual machine of my Mac).
In a Command Prompt, after running yarn
to install dependencies. I did yarn start
. And it gave me 'HTTPS' is not recognized as an internal or external command
error.
> yarn start
yarn run v1.13.0
$ HTTPS=true CERT=cert/localhost.crt KEY=cert/localhost.key umi dev
'HTTPS' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Does anyone know how to fix this?
Edit 1:
I upgraded node to v12.16.1
(yarn
to 1.13.0
, npm to 6.13.4
), and did yarn add https
and yarn add https-localhost
. However, yarn start
still returned 'HTTPS' is not recognized as an internal or external command
.
umi dev
returned 'umi' is not recognized as an internal or external command, operable program or batch file.
:
>umi dev
'umi' is not recognized as an internal or external command,
operable program or batch file.
SSL Certificate
? – Weather10.15.0
– Weatheryarn add https-localhost
and added the message to OP. After that,yarn start
still returned the https error. – Weather$ HTTPS=true CERT=cert/localhost.crt KEY=cert/localhost.key umi dev
- That looks like a shell command (Bourne/bash/Unix/Linux/POSIX) that invokes the commandumi dev
after setting variablesHTTPS
,CERT
, andKEY
. I'm not familiar with React or Yarn, but could it be it doesn't support Windows, or that something is misconfigured to make it think it's on a Unix-like system? – IntroitHTTPS=true
PORT=8080
HOST=localhost
– Tiffanitiffanie