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

branch:refactor/mv3 Popup shows "Vite server did not start" #99

Closed
5 tasks done
heavenkiller2018 opened this issue Nov 1, 2022 · 3 comments
Closed
5 tasks done

Comments

@heavenkiller2018
Copy link

Describe the bug

I donwloaded the latest mv3 branch, and then run it:

npx degit antfu/vitesse-webext#refactor/mv3 antfu@vitesse-webext_mv3
❯ npm run dev

> vitesse-webext@0.0.1 dev
> npm run clear && cross-env NODE_ENV=development run-p dev:*


> vitesse-webext@0.0.1 clear
> rimraf extension extension.*


> vitesse-webext@0.0.1 dev:js
> npm run build:js -- --mode development


> vitesse-webext@0.0.1 dev:bg
> tsup --watch ./src


> vitesse-webext@0.0.1 dev:prepare
> esno scripts/prepare.ts


> vitesse-webext@0.0.1 dev:web
> vite

CLI Building entry: {"background/index":"./src/background/index.ts","mv3client":"./scripts/client.ts"}
CLI Using tsconfig: tsconfig.json
CLI tsup v5.12.9
CLI Using tsup config: /home/john/project/testscratch/git-repos/antfu@vitesse-webext_mv3/tsup.config.ts
CLI Running in watch mode
CLI Target: esnext
ESM Build start
ESM ⚡️ Build success in 36ms
ESM extension/dist/mv3client.mjs        52.13 KB
ESM extension/dist/background/index.mjs 162.94 KB
CLI Watching for changes in "./src"
CLI Ignoring changes in "**/{.git,node_modules}/**" | "extension/dist" | "**/extension/**"

> vitesse-webext@0.0.1 build:js
> vite build --config vite.config.content.ts --mode development

build.terserOptions is specified but build.minify is not set to use Terser. Note Vite now defaults to use esbuild for minification. If you still prefer Terser, set build.minify to "terser".

  vite v2.9.15 dev server running at:

  > Local: http://localhost:3303/
  > Network: use `--host` to expose

  ready in 766ms.

vite v2.9.15 building for development...

watching for file changes...

build started...
transforming (12) contentScripts/views/App.vue PRE  write manifest.json
 PRE  stub options
 PRE  stub popup
✓ 21 modules transformed.
../extension/dist/contentScripts/style.css         3.11 KiB / gzip: 1.05 KiB
../extension/dist/contentScripts/index.global.js   96.18 KiB / gzip: 37.06 KiB
../extension/dist/contentScripts/index.global.js.map 702.67 KiB
built in 4854ms.

but the popup page show: Vite server did not start, why ? how to fix it?

Reproduction

reproduction

System Info

System:
    OS: Linux 5.15 Ubuntu 20.04.4 LTS (Focal Fossa)
    CPU: (8) x64 Intel Core Processor (Haswell, no TSX, IBRS)
    Memory: 25.33 GB / 31.35 GB
    Container: Yes
    Shell: 5.8 - /usr/bin/zsh
  Binaries:
    Node: 18.12.0 - ~/.nvm/versions/node/v18.12.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.12.0/bin/yarn
    npm: 8.19.2 - ~/.nvm/versions/node/v18.12.0/bin/npm
  Browsers:
    Chrome: 103.0.5060.53
    Firefox: 105.0

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.
@heavenkiller2018
Copy link
Author

heavenkiller2018 commented Nov 1, 2022

I found what the problem is. my development enviroment is vscode remote (linux), but my local os is windows. so in vite-mv3-hmr.ts, isWin is false. I staticly set it to be true, then everything is ok! but there is another problem that it's not a real HMR which only need to refresh the web page to reflect the changes. In fact, I have to reload this extension to see the changes every time when the source code is modified? why? and how to improve it?

@tmkx
Copy link
Collaborator

tmkx commented Nov 2, 2022

In fact, I have to reload this extension to see the changes every time when the source code is modified? why? and how to improve it?

#59 (comment), busy now, maybe I will have a look at it in some days 🤯.

@heavenkiller2018
Copy link
Author

I finally found what the problem is. I use raidrive to map the remote linux directory to local windows os with webdav, but there is delay in that manner when files syncing. I changed it to samba, then everything is ok! The HMR works😍😍😍

@tmkx tmkx closed this as completed Nov 20, 2022
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

2 participants