`plasmo dev` doesn't work in yarn pnp monorepo

I initialized a basic plasmo extension in the packages folder of our monorepo. we are using yarn plug'n'play so I tried running pnpify plasmo dev in the script. But I get this error ERROR | EROFS: read-only filesystem, open '/node_modules/@plasmohq/parcel-config/run.json' I tried running it with verbose and get this.
EROFS: read-only filesystem, open '/node_modules/@plasmohq/parcel-config/run.json'
🟡 13 | Error: EROFS: read-only filesystem, open '/node_modules/@plasmohq/parcel-config/run.json'
at makeError$1 (/Users/<user>/code/automation/.pnp.cjs:28889:24)
at EROFS (/Users/<user>/code/automation/.pnp.cjs:28916:10)
at ZipFS.prepareWriteFile (/Users/<user>/code/automation/.pnp.cjs:30751:13)
at ZipFS.writeFilePromise (/Users/<user>/code/automation/.pnp.cjs:30722:55)
at /Users/<user>/code/automation/.pnp.cjs:31843:26
at /Users/<user>/code/automation/.pnp.cjs:32067:81
at ZipOpenFS.getZipPromise (/Users/<user>/code/automation/.pnp.cjs:32174:22)
at ZipOpenFS.makeCallPromise (/Users/<user>/code/automation/.pnp.cjs:32067:23)
at ZipOpenFS.writeFilePromise (/Users/<user>/code/automation/.pnp.cjs:31840:23)
EROFS: read-only filesystem, open '/node_modules/@plasmohq/parcel-config/run.json'
🟡 13 | Error: EROFS: read-only filesystem, open '/node_modules/@plasmohq/parcel-config/run.json'
at makeError$1 (/Users/<user>/code/automation/.pnp.cjs:28889:24)
at EROFS (/Users/<user>/code/automation/.pnp.cjs:28916:10)
at ZipFS.prepareWriteFile (/Users/<user>/code/automation/.pnp.cjs:30751:13)
at ZipFS.writeFilePromise (/Users/<user>/code/automation/.pnp.cjs:30722:55)
at /Users/<user>/code/automation/.pnp.cjs:31843:26
at /Users/<user>/code/automation/.pnp.cjs:32067:81
at ZipOpenFS.getZipPromise (/Users/<user>/code/automation/.pnp.cjs:32174:22)
at ZipOpenFS.makeCallPromise (/Users/<user>/code/automation/.pnp.cjs:32067:23)
at ZipOpenFS.writeFilePromise (/Users/<user>/code/automation/.pnp.cjs:31840:23)
Does plasmo just not supports this? I can't find anything online about these error messages. Any ideas/info about pnp support with plasmo?
5 Replies
gary_29
gary_29OP•17mo ago
It looks like parcel is unintentially trying to write the virtual fs yarn creates?
gibbs4609
gibbs4609•17mo ago
I encounter the same issue. I told yarn to unplug @plasmohq/parcel-config but then I'm stuck with another error:
:large_purple_circle: Plasmo v0.82.1
:red_circle: The Browser Extension Framework
:large_blue_circle: INFO | Prepare to bundle the extension...
:large_blue_circle: INFO | Loaded environment variables from: []
:red_circle: ERROR | Failed to resolve ‘packages/fq-assistant/.plasmo/chrome-mv3.plasmo.manifest.json’
:red_circle: EXIT | :wave: Good bye and have a great day!
:large_purple_circle: Plasmo v0.82.1
:red_circle: The Browser Extension Framework
:large_blue_circle: INFO | Prepare to bundle the extension...
:large_blue_circle: INFO | Loaded environment variables from: []
:red_circle: ERROR | Failed to resolve ‘packages/fq-assistant/.plasmo/chrome-mv3.plasmo.manifest.json’
:red_circle: EXIT | :wave: Good bye and have a great day!
No description
gibbs4609
gibbs4609•17mo ago
I've found a workaround: in your root package.json, add:
"dependenciesMeta": {
"@plasmohq/parcel-config": {
"unplugged": true
},
}
"dependenciesMeta": {
"@plasmohq/parcel-config": {
"unplugged": true
},
}
Then, in your .yarnrc.yml:
packageExtensions:
'@parcel/node-resolver-core@*':
dependencies:
'@parcel/core': '*'
packageExtensions:
'@parcel/node-resolver-core@*':
dependencies:
'@parcel/core': '*'
` It works like a charm for me. I'm using plasmo v0.82.1
gary_29
gary_29OP•16mo ago
Nice good find!
Arcane
Arcane•16mo ago
@gary_29 has reached level 1. GG!
Want results from more Discord servers?
Add your server