PlasmoHQ / plasmo

🧩 The Browser Extension Framework
https://www.plasmo.com
MIT License
10.31k stars 358 forks source link

[BUG] WARN | Unable to find any entry files. The extension might be empty #989

Open TommyWongDev opened 4 months ago

TommyWongDev commented 4 months ago

What happened?

I have encountered this bug for a couple of time already. the project works well originally even for a new created project without any new code aded on it, but everytime when the plasmo server idled for a while of time (like 45mins to 1hr), this warn ing appear when I reload the webpage. Plasmo become unclickable and nothing works even for the default popup.tsx. I have to delete the project and start a new project everytime. May i know is there any solution to solve this? Thanks. Screenshot 2024-06-03 at 14 03 39

Version

Latest

What OS are you seeing the problem on?

MacOSX

What browsers are you seeing the problem on?

Chrome

Relevant log output

Plasmo v0.86.3
🔴 The Browser Extension Framework
🔵 INFO   | Starting the extension development server...
🟠 WARN   | Unable to find any entry files. The extension might be empty
🔵 INFO   | Loaded environment variables from: []

(OPTIONAL) Contribution

Code of Conduct

andymitchell commented 2 months ago

Hi Tommy,

I had the same issue, and tried recreating the project from scratch several times to try to isolate it.

In the end, it's because I had a src directory in the root of my Plasmo directory. By simply renaming this to anything else (even just src-another), it worked.

bearjaws commented 3 weeks ago

I'll confirm what @andymitchell said there and add, if you plan to use the src folder (which I highly recommend when using tailwindcss) you also need to move items like the newtab folder into the src folder.

Plasmo uses a lot of implicit mapping and once you make a src folder it becomes the defacto place to store code.