aklinker1 / vite-plugin-web-extension

Vite plugin for developing Chrome/Web Extensions
https://vite-plugin-web-extension.aklinker1.io/
MIT License
606 stars 52 forks source link

[web-extension:manifest] Entrypoint output for src/popup.html (src/popup.html) not found #78

Closed mklueh closed 1 year ago

mklueh commented 1 year ago

Hello,

I'm getting this error out of the sudden

[web-extension:manifest] Entrypoint output for src/popup.html (src/popup.html) not found

and the browser does not start anymore.

does anyone have an idea what is going wrong?

{
  "{{chrome}}.manifest_version": 3,
  "{{firefox}}.manifest_version": 2,
  "icons": {
    "16": "icon/16.png",
    "32": "icon/32.png",
    "48": "icon/48.png",
    "96": "icon/96.png",
    "128": "icon/128.png"
  },
  "{{chrome}}.action": {
    "default_popup": "src/popup.html"
  },
  "{{firefox}}.browser_action": {
    "default_popup": "src/popup.html"
  },
  "background": {
    "service_worker": "src/background.ts"
  },
  "options_page": "src/options.html",
  "permissions": [
    "alarms",
    "storage",
    "identity",
    "activeTab",
    "contextMenus",
    "videoCapture",
    "desktopCapture",
    "notifications",
    "syncFileSystem",
    "{{firefox}}.<all_urls>"
  ]
}

image

image

aklinker1 commented 1 year ago

@mklueh Could you run this command inside your project and share the output?

npx envinfo --system --browsers --binaries --npmPackages vite,vite-plugin-web-extension
mklueh commented 1 year ago

Hi @aklinker1

this is the output

  System:
    OS: Linux 5.15 Ubuntu 20.04.5 LTS (Focal Fossa)
    CPU: (5) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
    Memory: 3.21 GB / 9.72 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 16.19.1 - /usr/bin/node
    Yarn: 3.4.1 - ~/.yarn/bin/yarn
    npm: 8.19.4 - ~/workspace/my-project/node_modules/.bin/npm
  Browsers:
    Chrome: 110.0.5481.177
  npmPackages:
    vite: ^4.1.4 => 4.1.4
    vite-plugin-web-extension: ^2.0.3 => 2.0.3
aklinker1 commented 1 year ago

Hmm, darn not windows. I just fixed a problem like this for windows, and you're also on the latest version...

All your screenshots look correct. Without looking at your full configuration, I can't tell what's causing this error. Can you share a git repo with a minimal reproduction?

mklueh commented 1 year ago

@aklinker1 I'll do that as soon as I have time.

But to be clear, it worked one week ago 😃 not sure if it was an older version back then. I might try to downgrade and try again

aklinker1 commented 1 year ago

I was able to reproduce this. It's because you're using Vite 4, v2 only supports vite 3. Run npm i vite@3.2.5 and it will work for you. I'm looking into vite 4 support now. See #67

aklinker1 commented 1 year ago

This has been fixed in v3.0.0 by adding vite 4 support. Just update the plugin version, and you should be good to go.

pnpm i vite-plugin-web-extension@latest
mklueh commented 1 year ago

@aklinker1 nice, thank you very much :)