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

[BUG] Plasmo build stops working after a few runs (on any project/starter templates/etc...) #1131

Open
2 of 3 tasks
reedjones opened this issue Nov 11, 2024 · 0 comments
Open
2 of 3 tasks
Labels
bug Something isn't working

Comments

@reedjones
Copy link

What happened?

Basically I can clone one of the starter repositories, and build a few times - after a few I consistently get this error.
I've tried changing node versions, changing package managers, parcel versions, etc... not sure what the issue is? Or even if it is an issue with parcel, plasmo, pnpm, my setup, etc???
It's been driving me crazy... Any help much appreciated!

pnpm create plasmo --with-env
pnpm dev

🟣 Plasmo v0.89.4
🔴 The Browser Extension Framework
🔵 INFO   | Starting the extension development server...
🔵 INFO   | Building for target: chrome-mv3
🔵 INFO   | Loaded environment variables from: [ '.env' ]
🔄 Building..node:internal/event_target:1094
  process.nextTick(() => { throw err; });
Error: Cannot find module '@parcel/diagnostic'

Full stack trace:

🔄 Building...🟡 0      | @plasmohq/parcel-optimizer-encapsulate static\background\index.js static\background\index.js
🟡 1      | @plasmohq/parcel-optimizer-encapsulate multiple.[hash].js multiple.[hash].js
🟡 2      | @plasmohq/parcel-optimizer-encapsulate overlay.[hash].js overlay.[hash].js
🟡 0      | @plasmohq/optimizer-es: static\background\index.js static\background\index.js [PROJECT_PATH]
🟡 1      | @plasmohq/optimizer-es: multiple.[hash].js multiple.[hash].js [PROJECT_PATH]
🟡 2      | @plasmohq/optimizer-es: overlay.[hash].js overlay.[hash].js [PROJECT_PATH]
🟡 3      | optimizer-es: skipped
🟡 4      | optimizer-es: skipped
🟡 5      | optimizer-es: skipped
🔄 Building   node:internal/event_target:1094
  process.nextTick(() => { throw err; });
                           ^

Error: Cannot find module '@parcel/diagnostic'
Require stack:
- [PROJECT_PATH]\node_modules\.pnpm\@[email protected]\node_modules\@parcel\logger\lib\Logger.js
- [PROJECT_PATH]\node_modules\.pnpm\@[email protected]\node_modules\@parcel\utils\lib\index.js
- [PROJECT_PATH]\node_modules\.pnpm\@[email protected]\node_modules\@parcel\core\lib\public\Config.js
- [PROJECT_PATH]\node_modules\.pnpm\@[email protected]\node_modules\@parcel\core\lib\utils.js
- [PROJECT_PATH]\node_modules\.pnpm\@[email protected]\node_modules\@parcel\core\lib\public\Environment.js
- [PROJECT_PATH]\node_modules\.pnpm\@[email protected]\node_modules\@parcel\core\lib\public\Asset.js
- [PROJECT_PATH]\node_modules\.pnpm\@[email protected]\node_modules\@parcel\core\lib\Parcel.js
- [PROJECT_PATH]\node_modules\.pnpm\@[email protected]\node_modules\@parcel\core\lib\index.js
- [PROJECT_PATH]\node_modules\.pnpm\@[email protected]_@[email protected]\node_modules\@parcel\fs\lib\index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at Module._load (node:internal/modules/cjs/loader:1051:27)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at require (node:internal/modules/helpers:179:18)
    at _diagnostic ([PROJECT_PATH]\node_modules\.pnpm\@[email protected]\node_modules\@parcel\logger\lib\Logger.js:24:16)
    at Logger.error ([PROJECT_PATH]\node_modules\.pnpm\@[email protected]\node_modules\@parcel\logger\lib\Logger.js:60:26)
    at WorkerFarm.onError ([PROJECT_PATH]\node_modules\.pnpm\@[email protected]_@[email protected]\node_modules\@parcel\workers\lib\WorkerFarm.js:205:25)
    at Worker.<anonymous> ([PROJECT_PATH]\node_modules\.pnpm\@[email protected]_@[email protected]\node_modules\@parcel\workers\lib\WorkerFarm.js:220:36)
    at Worker.emit (node:events:519:28)
    at worker.WorkerBackend.exitCode ([PROJECT_PATH]\node_modules\.pnpm\@[email protected]_@[email protected]\node_modules\@parcel\workers\lib\Worker.js:79:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '[PROJECT_PATH]\\node_modules\\.pnpm\\@[email protected]\\node_modules\\@parcel\\logger\\lib\\Logger.js',
    '[PROJECT_PATH]\\node_modules\\.pnpm\\@[email protected]\\node_modules\\@parcel\\utils\\lib\\index.js',
    '[PROJECT_PATH]\\node_modules\\.pnpm\\@[email protected]\\node_modules\\@parcel\\core\\lib\\public\\Config.js',
    '[PROJECT_PATH]\\node_modules\\.pnpm\\@[email protected]\\node_modules\\@parcel\\core\\lib\\utils.js',
    '[PROJECT_PATH]\\node_modules\\.pnpm\\@[email protected]\\node_modules\\@parcel\\core\\lib\\public\\Environment.js',
    '[PROJECT_PATH]\\node_modules\\.pnpm\\@[email protected]\\node_modules\\@parcel\\core\\lib\\public\\Asset.js',
    '[PROJECT_PATH]\\node_modules\\.pnpm\\@[email protected]\\node_modules\\@parcel\\core\\lib\\Parcel.js',
    '[PROJECT_PATH]\\node_modules\\.pnpm\\@[email protected]\\node_modules\\@parcel\\core\\lib\\index.js',
    '[PROJECT_PATH]\\node_modules\\.pnpm\\@[email protected]_@[email protected]\\node_modules\\@parcel\\fs\\lib\\index.js'
  ]
}

Software Version
Plasmo v0.89.4
Node v20.18.0
pnpm 9.12.2
parcel 2.9.3

possibly related: parcel-bundler/parcel#7590 parcel-bundler/parcel#5744

Version

Latest

What OS are you seeing the problem on?

Windows

What browsers are you seeing the problem on?

No response

Relevant log output

Error: Cannot find module '@parcel/diagnostic'
Require stack:
- [PROJECT_PATH]\node_modules\.pnpm\@[email protected]\node_modules\@parcel\logger\lib\Logger.js
- [PROJECT_PATH]\node_modules\.pnpm\@[email protected]\node_modules\@parcel\utils\lib\index.js
- [PROJECT_PATH]\node_modules\.pnpm\@[email protected]\node_modules\@parcel\core\lib\public\Config.js
- [PROJECT_PATH]\node_modules\.pnpm\@[email protected]\node_modules\@parcel\core\lib\utils.js
- [PROJECT_PATH]\node_modules\.pnpm\@[email protected]\node_modules\@parcel\core\lib\public\Environment.js
- [PROJECT_PATH]\node_modules\.pnpm\@[email protected]\node_modules\@parcel\core\lib\public\Asset.js
- [PROJECT_PATH]\node_modules\.pnpm\@[email protected]\node_modules\@parcel\core\lib\Parcel.js
- [PROJECT_PATH]\node_modules\.pnpm\@[email protected]\node_modules\@parcel\core\lib\index.js
- [PROJECT_PATH]\node_modules\.pnpm\@[email protected]_@[email protected]\node_modules\@parcel\fs\lib\index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at Module._load (node:internal/modules/cjs/loader:1051:27)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at require (node:internal/modules/helpers:179:18)
    at _diagnostic ([PROJECT_PATH]\node_modules\.pnpm\@[email protected]\node_modules\@parcel\logger\lib\Logger.js:24:16)
    at Logger.error ([PROJECT_PATH]\node_modules\.pnpm\@[email protected]\node_modules\@parcel\logger\lib\Logger.js:60:26)
    at WorkerFarm.onError ([PROJECT_PATH]\node_modules\.pnpm\@[email protected]_@[email protected]\node_modules\@parcel\workers\lib\WorkerFarm.js:205:25)
    at Worker.<anonymous> ([PROJECT_PATH]\node_modules\.pnpm\@[email protected]_@[email protected]\node_modules\@parcel\workers\lib\WorkerFarm.js:220:36)
    at Worker.emit (node:events:519:28)
    at worker.WorkerBackend.exitCode ([PROJECT_PATH]\node_modules\.pnpm\@[email protected]_@[email protected]\node_modules\@parcel\workers\lib\Worker.js:79:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '[PROJECT_PATH]\\node_modules\\.pnpm\\@[email protected]\\node_modules\\@parcel\\logger\\lib\\Logger.js',
    '[PROJECT_PATH]\\node_modules\\.pnpm\\@[email protected]\\node_modules\\@parcel\\utils\\lib\\index.js',
    '[PROJECT_PATH]\\node_modules\\.pnpm\\@[email protected]\\node_modules\\@parcel\\core\\lib\\public\\Config.js',
    '[PROJECT_PATH]\\node_modules\\.pnpm\\@[email protected]\\node_modules\\@parcel\\core\\lib\\utils.js',
    '[PROJECT_PATH]\\node_modules\\.pnpm\\@[email protected]\\node_modules\\@parcel\\core\\lib\\public\\Environment.js',
    '[PROJECT_PATH]\\node_modules\\.pnpm\\@[email protected]\\node_modules\\@parcel\\core\\lib\\public\\Asset.js',
    '[PROJECT_PATH]\\node_modules\\.pnpm\\@[email protected]\\node_modules\\@parcel\\core\\lib\\Parcel.js',
    '[PROJECT_PATH]\\node_modules\\.pnpm\\@[email protected]\\node_modules\\@parcel\\core\\lib\\index.js',
    '[PROJECT_PATH]\\node_modules\\.pnpm\\@[email protected]_@[email protected]\\node_modules\\@parcel\\fs\\lib\\index.js'
  ]
}

(OPTIONAL) Contribution

  • I would like to fix this BUG via a PR

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I checked the current issues for duplicate problems.
@reedjones reedjones added the bug Something isn't working label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant