Build failing: Cannot resolve/load gen-assets/iconXX.plasmo.png

Okay, here's a draft message you can adapt and post to the Plasmo Discord server. It summarizes the issue and the steps you've already taken: Subject: plasmo dev failing to resolve icons despite package.json configuration --- Hi Plasmo community! πŸ‘‹ I'm encountering an issue where plasmo dev (v0.90.3 on macOS) consistently fails because it can't resolve icon assets, even though I believe I've configured them correctly. The air really came out of nowhere, and it was working just before it happened. I tried going to a different commit hash, but the problem persisted The Error: The build fails with errors like:
πŸ”΄ ERROR | Failed to resolve './gen-assets/iconXX.plasmo.png' from './.plasmo/chrome-mv3.plasmo.manifest.json'
πŸ”΄ ERROR | Cannot load file './gen-assets/iconXX.plasmo.png' in './.plasmo'.
πŸ”΄ ERROR | Failed to resolve './gen-assets/iconXX.plasmo.png' from './.plasmo/chrome-mv3.plasmo.manifest.json'
πŸ”΄ ERROR | Cannot load file './gen-assets/iconXX.plasmo.png' in './.plasmo'.
(The specific size like icon32 or icon64 seems to vary between attempts). What I've Tried: 1. Ensured I have an assets/ directory containing icon16.png, icon48.png, and icon128.png. 2. Added the following configuration to my package.json:
"plasmo": {
"icons": {
"16": "assets/icon16.png",
"48": "assets/icon48.png",
"128": "assets/icon128.png"
}
}

"plasmo": {
"icons": {
"16": "assets/icon16.png",
"48": "assets/icon48.png",
"128": "assets/icon128.png"
}
}

3. Deleted the .plasmo and build directories multiple times using rm -rf .plasmo build. 4. Ran the dev server using pnpm dev from the project root directory (where package.json and assets/ are located). Despite these steps, Plasmo still seems to be trying to generate icons (like iconXX.plasmo.png) instead of directly using the paths provided in package.json, causing the build to fail. Has anyone encountered this before, or have any suggestions on what might be going wrong or what else I could check? Thanks in advance for any help!
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?