Search code examples
macosnpmterminal

Vite React App do not open default browser from terminal


I am in Mac OS Terminal.
I create a React app with npm create vite.
Then npm install and npm run dev.
Then o to open app in browser.

But it opens Chrome instead of Brave (which is my default browser).
This is an error.

Somebody knows why this happen?


Solution

  • Inside node_modules/vite/bin directory, there is a file named openChrome.applescript

    try :

    mv openChrome.applescript openChrome.applescript.bak