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

serve 14.2.1 CLI arguments issue http to https #783

Open
Maximvdw opened this issue Sep 14, 2023 · 0 comments
Open

serve 14.2.1 CLI arguments issue http to https #783

Maximvdw opened this issue Sep 14, 2023 · 0 comments

Comments

@Maximvdw
Copy link

Maximvdw commented Sep 14, 2023

Description

On Windows, I am getting the following output when executing serve CLI without configuration file or other options:
$ npx serve@14.2.1 ./
as non admin.

Any CLI arguments are ignored and used as the serving path. Hence why I think the https issue outlined below is just a result of some CLI argument being "true" even tho it is not used

Output

Serving static path: ./
Generating certificates...
Certificates path: C:\Users\maxim\AppData\Roaming\https-localhost. Never modify nor share this files.
Downloading the mkcert executable...
http to https redirection active.
Running mkcert to generate certificates...
The local CA is already installed in the system trust store! 👍
Note: Firefox support is not available on your platform. ℹ️
ERROR: failed to execute "keytool -importcert": exit status 1

Warning: use -cacerts option to access cacerts keystore
Certificate was added to keystore
keytool error: java.io.FileNotFoundException: C:\Program Files\Java\jdk-17\lib\security\cacerts (Access is denied)


Error: Command failed: "C:\Users\maxim\AppData\Roaming\https-localhost\mkcert-v1.4.3-windows-amd64.exe" -install -cert-file "C:\Users\maxim\AppData\Roaming\https-localhost\localhost.crt" -key-file "C:\Users\maxim\AppData\Roaming\https-localhost\localhost.key" localhost
The local CA is already installed in the system trust store! 👍
Note: Firefox support is not available on your platform. ℹ️
ERROR: failed to execute "keytool -importcert": exit status 1

Warning: use -cacerts option to access cacerts keystore
Certificate was added to keystore
keytool error: java.io.FileNotFoundException: C:\Program Files\Java\jdk-17\lib\security\cacerts (Access is denied)


    at ChildProcess.exithandler (node:child_process:412:12)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1091:16)
    at ChildProcess._handle.onexit (node:internal/child_process:302:5) {
  code: 1,
  killed: false,
  signal: null,
  cmd: '"C:\\Users\\maxim\\AppData\\Roaming\\https-localhost\\mkcert-v1.4.3-windows-amd64.exe" -install -cert-file "C:\\Users\\maxim\\AppData\\Roaming\\https-localhost\\localhost.crt" -key-file "C:\\Users\\maxim\\AppData\\Roaming\\https-localhost\\localhost.key" localhost'
}
Unexpected error undefined:

Error: Command failed: "C:\Users\maxim\AppData\Roaming\https-localhost\mkcert-v1.4.3-windows-amd64.exe" -install -cert-file "C:\Users\maxim\AppData\Roaming\https-localhost\localhost.crt" -key-file "C:\Users\maxim\AppData\Roaming\https-localhost\localhost.key" localhost
The local CA is already installed in the system trust store! 👍
Note: Firefox support is not available on your platform. ℹ️
ERROR: failed to execute "keytool -importcert": exit status 1

Warning: use -cacerts option to access cacerts keystore
Certificate was added to keystore
keytool error: java.io.FileNotFoundException: C:\Program Files\Java\jdk-17\lib\security\cacerts (Access is denied)

on 14.2.0 this issue does not exist

Library version

Serving static path: --version Generating certificates... Certificates path: C:\Users\maxim\AppData\Roaming\https-localhost. Never modify nor share this files. Downloading the mkcert executable... http to https redirection active

Node version

v18.12.1

@Maximvdw Maximvdw changed the title serve 14.2.1 Windows issue http to https serve 14.2.1 CLI arguments issue http to https Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant