antfu-collective / vitesse-webext

⚡️ WebExtension Vite Starter Template
MIT License
2.86k stars 221 forks source link

Vite server did not start #129

Closed flynncao closed 1 year ago

flynncao commented 1 year ago

Describe the bug

I've tried both branches's code by running pnpm install and pnpm run dev directly and none of them work perfectly, my problems are:

I'm tryting to develop a chrome extension:

main branch:

After running "pnpm run dev", terminal showed:

[Error: ENOENT: no such file or directory, open 'E:\ChromeExtensionRepositories\antfu-templates\vitesse-webext\src\background\index.html'] {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'open',
  path: 'E:\\ChromeExtensionRepositories\\antfu-templates\\vitesse-webext\\src\\background\\index.html'
}

refactor/mv3 branch:

Everything worked fine during build process but after loading the extension and enable it, both the option page and popup page showed "Vite server did not start", tho it's obvious the vite server had started successfully on default port.

Really appreciate if anyone can solve my problems!

Reproduction

None. It's from scratch.

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (12) x64 Intel(R) Core(TM) i5-10600KF CPU @ 4.10GHz
    Memory: 7.87 GB / 23.85 GB
  Binaries:
    Node: 16.14.2 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.15 - C:\Program Files\nodejs\yarn.CMD
    npm: 9.5.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22621.1555.0), Chromium (112.0.1722.68)
    Internet Explorer: 11.0.22621.1

Used Package Manager

npm

Validations

betteralong commented 1 year ago

I have the same problem. running pnpm dev error message [Error: ENOENT: no such file or directory, open '/Users/yeguo/work/vitesse-webext/src/background/index.html'] { errno: -2, code: 'ENOENT', syscall: 'open', path: '/Users/yeguo/work/vitesse-webext/src/background/index.html' }

tmkx commented 1 year ago

refactor/mv3 branch:

@FlynnCao The latest commit has fixed the issue.

by the way, we recommend using pnpm, you can install dependencies by npm i -g pnpm && pnpm i

flynncao commented 1 year ago

refactor/mv3 branch:

@FlynnCao The latest commit has fixed the issue.

by the way, we recommend using pnpm, you can install dependencies by npm i -g pnpm && pnpm i

Tks! Helps a lot~