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

npx vite requires sudo privileges #11772

Closed
7 tasks done
mattgallagher92 opened this issue Jan 20, 2023 · 2 comments
Closed
7 tasks done

npx vite requires sudo privileges #11772

mattgallagher92 opened this issue Jan 20, 2023 · 2 comments
Labels
invalid This doesn't seem right

Comments

@mattgallagher92
Copy link

Describe the bug

I tried running https://github.com/JordanMarr/fable-lit-fullstack-template, which runs on Vite. When the app got to running vite, I was prompted for sudo privileges, similarly to what was described in #11361.

My OS is Ubuntu 22.04.

Reproduction

https://github.com/JordanMarr/fable-lit-fullstack-template/

Steps to reproduce

Option 1: without dotnet-sdk-6.0 (untested repro steps - I have dotnet-sdk-6.0 installed)

Clone https://github.com/JordanMarr/fable-lit-fullstack-template/
Open ./Template/WebLit in a terminal
Run npx vite

Option 2: with dotnet-sdk-6.0 (tested)

Install from the Microsoft package feed (see https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#2204-microsoft-package-feed)

dotnet new install fable-lit-fullstack-template
dotnet new flft -o MyLitApp
cd MyLitApp/Build/
dotnet run restore
cd ../WebLit
npm start

Eventually, you'll see these logs:

...
Started Fable compilation...
Fable compilation finished in 3767ms

.> node_modules/.bin/vite
Watching ..
Sudo password:

Cancelling that, you also run npx vite from within the WebLit directory (that you should already be in) and you will see the following message:

Sudo password:

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
    Memory: 16.65 GB / 31.14 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 16.19.0 - /usr/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 8.19.3 - /usr/bin/npm
  Browsers:
    Brave Browser: 109.1.47.171
    Chromium: 109.0.5414.74
    Firefox: 109.0
  npmPackages:
    vite: ^2.9.13 => 2.9.13

Used Package Manager

npm

Logs

No response

Validations

@sapphi-red
Copy link
Member

I was able to reproduce.
But when I remove vite-plugin-mkcert, it didn't happen. This is happening because of that plugin.

Closing as this is not happening because of Vite itself.

@sapphi-red sapphi-red added invalid This doesn't seem right and removed pending triage labels Jan 21, 2023
@mattgallagher92
Copy link
Author

Thanks for identifying the plugin causing the issue and sorry for incorrectly raising the issue against the Vite repo.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants