antfu-collective/vitesse-webext

Vite server did not start

Closed this issue · 3 comments

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

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

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

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

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~