dp
dp
PD🧩 Plasmo Developers
Created by dp on 4/1/2024 in #πŸ‘Ύextension
plasmo dev is failing
here is the verbose output
(...)
🟑 4 | @plasmohq/optimizer-es: tabs/import-wallet-with-socials.a896c681.js tabs/import-wallet-with-socials.[hash].js /Users/dp/work/extension
🟑 5 | optimizer-es: skipped
(...)
🟑 9 | optimizer-es: skipped
/Users/dp/work/extension/node_modules/@plasmohq/parcel-compressor-utf8/dist/index.js:1
var a=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var l=(o,r)=>{for(var e in r)a(o,e,{get:r[e],enumerable:!0})},c=(o,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of p(r))!u.call(o,t)&&t!==e&&a(o,t,{get:()=>r[t],enumerable:!(n=d(r,t))||n.enumerable});return o};var C=o=>c(a({},"__esModule",{value:!0}),o);var g={};l(g,{default:()=>h});module.exports=C(g);var i=require("@parcel/plugin");var m=require("stream"),f=require("string_decoder"),s=class extends m.Transform{decoder=new f.StringDecoder("utf8");_transform(r,e,n){n(null,this.transformChunk(this.decoder.write(r)))}_flush(r){let e=this.decoder.end();e?r(null,this.transformChunk(e)):r()}transformChunk(r){return Array.from(r).map(e=>e.charCodeAt(0)<=127?e:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)).join("")}};var h=new i.Compressor({async compress({stream:o}){return{stream:o.pipe(new s)}}});


RangeError: Invalid array length
at Function.from (<anonymous>)
at s.transformChunk (/Users/dp/work/extension/node_modules/@plasmohq/parcel-compressor-utf8/dist/index.js:1:783)
at s._transform (/Users/dp/work/extension/node_modules/@plasmohq/parcel-compressor-utf8/dist/index.js:1:641)
at Transform._write (node:internal/streams/transform:171:8)
at writeOrBuffer (node:internal/streams/writable:564:12)
at _write (node:internal/streams/writable:493:10)(...)
at Readable.emit (node:events:518:28)
at Readable.read (node:internal/streams/readable:780:10)
(...)
🟑 4 | @plasmohq/optimizer-es: tabs/import-wallet-with-socials.a896c681.js tabs/import-wallet-with-socials.[hash].js /Users/dp/work/extension
🟑 5 | optimizer-es: skipped
(...)
🟑 9 | optimizer-es: skipped
/Users/dp/work/extension/node_modules/@plasmohq/parcel-compressor-utf8/dist/index.js:1
var a=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var l=(o,r)=>{for(var e in r)a(o,e,{get:r[e],enumerable:!0})},c=(o,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of p(r))!u.call(o,t)&&t!==e&&a(o,t,{get:()=>r[t],enumerable:!(n=d(r,t))||n.enumerable});return o};var C=o=>c(a({},"__esModule",{value:!0}),o);var g={};l(g,{default:()=>h});module.exports=C(g);var i=require("@parcel/plugin");var m=require("stream"),f=require("string_decoder"),s=class extends m.Transform{decoder=new f.StringDecoder("utf8");_transform(r,e,n){n(null,this.transformChunk(this.decoder.write(r)))}_flush(r){let e=this.decoder.end();e?r(null,this.transformChunk(e)):r()}transformChunk(r){return Array.from(r).map(e=>e.charCodeAt(0)<=127?e:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)).join("")}};var h=new i.Compressor({async compress({stream:o}){return{stream:o.pipe(new s)}}});


RangeError: Invalid array length
at Function.from (<anonymous>)
at s.transformChunk (/Users/dp/work/extension/node_modules/@plasmohq/parcel-compressor-utf8/dist/index.js:1:783)
at s._transform (/Users/dp/work/extension/node_modules/@plasmohq/parcel-compressor-utf8/dist/index.js:1:641)
at Transform._write (node:internal/streams/transform:171:8)
at writeOrBuffer (node:internal/streams/writable:564:12)
at _write (node:internal/streams/writable:493:10)(...)
at Readable.emit (node:events:518:28)
at Readable.read (node:internal/streams/readable:780:10)
7 replies
PD🧩 Plasmo Developers
Created by dp on 3/21/2024 in #πŸ‘Ύextension
Bug : EAGAIN when use `plasmo package`
EAGAIN when using plasmo package
% yarn package --verbose
yarn run v1.22.22
warning package.json: No license field
$ plasmo package --verbose
🟑 0 | Running command: package
🟣 Plasmo v0.85.2
πŸ”΄ The Browser Extension Framework
πŸ”΅ INFO | Prepare to package the extension bundle...
🟑 1 | Creating Manifest Factory...
🟑 2 | Ensure exists: /Users/dp/work/extension/.plasmo
🟑 3 | /Users/dp/work/extension/assets/icon.png found, creating resized icons
🟑 4 | Creating static templates for popup
🟑 5 | Creating static templates for options
🟑 6 | Creating static templates for newtab
🟑 7 | Creating static templates for devtools
🟑 8 | Creating static templates for sidepanel

(...)
🟑 18 | { messageHandlerList: [], portHandlerList: [] }
🟑 19 | Creating BGSW entry
🟑 20 | Hash changed, updating manifest


πŸ”΄ ERROR | EAGAIN
🟑 21 | Error: EAGAIN
at new Worker (node:internal/worker:291:19)
at wk (file:///Users/dp/work/extension/node_modules/fflate/esm/index.mjs:22:13)
at wrkr (file:///Users/dp/work/extension/node_modules/fflate/esm/index.mjs:893:12)
at astrmify (file:///Users/dp/work/extension/node_modules/fflate/esm/index.mjs:930:13)
at new AsyncDeflate (file:///Users/dp/work/extension/node_modules/fflate/esm/index.mjs:1086:9)
at new AsyncZipDeflate (file:///Users/dp/work/extension/node_modules/fflate/esm/index.mjs:1949:18)
at file:///Users/dp/work/extension/node_modules/plasmo/dist/index.js:166:10563
at new Promise (<anonymous>)
at Qr (file:///Users/dp/work/extension/node_modules/plasmo/dist/index.js:166:10341)
at async Zh (file:///Users/dp/work/extension/node_modules/plasmo/dist/index.js:166:11510)
πŸ”΄ EXIT | This program will terminate in 3 seconds...
% yarn package --verbose
yarn run v1.22.22
warning package.json: No license field
$ plasmo package --verbose
🟑 0 | Running command: package
🟣 Plasmo v0.85.2
πŸ”΄ The Browser Extension Framework
πŸ”΅ INFO | Prepare to package the extension bundle...
🟑 1 | Creating Manifest Factory...
🟑 2 | Ensure exists: /Users/dp/work/extension/.plasmo
🟑 3 | /Users/dp/work/extension/assets/icon.png found, creating resized icons
🟑 4 | Creating static templates for popup
🟑 5 | Creating static templates for options
🟑 6 | Creating static templates for newtab
🟑 7 | Creating static templates for devtools
🟑 8 | Creating static templates for sidepanel

(...)
🟑 18 | { messageHandlerList: [], portHandlerList: [] }
🟑 19 | Creating BGSW entry
🟑 20 | Hash changed, updating manifest


πŸ”΄ ERROR | EAGAIN
🟑 21 | Error: EAGAIN
at new Worker (node:internal/worker:291:19)
at wk (file:///Users/dp/work/extension/node_modules/fflate/esm/index.mjs:22:13)
at wrkr (file:///Users/dp/work/extension/node_modules/fflate/esm/index.mjs:893:12)
at astrmify (file:///Users/dp/work/extension/node_modules/fflate/esm/index.mjs:930:13)
at new AsyncDeflate (file:///Users/dp/work/extension/node_modules/fflate/esm/index.mjs:1086:9)
at new AsyncZipDeflate (file:///Users/dp/work/extension/node_modules/fflate/esm/index.mjs:1949:18)
at file:///Users/dp/work/extension/node_modules/plasmo/dist/index.js:166:10563
at new Promise (<anonymous>)
at Qr (file:///Users/dp/work/extension/node_modules/plasmo/dist/index.js:166:10341)
at async Zh (file:///Users/dp/work/extension/node_modules/plasmo/dist/index.js:166:11510)
πŸ”΄ EXIT | This program will terminate in 3 seconds...
It then starts to use a lot of memory
79 replies
PD🧩 Plasmo Developers
Created by dp on 2/15/2024 in #πŸ”°newbie
Is there a way to build a webapp or electron app based on a Plasmo project?
Hello We're building a browser extension, but for the sake of testing we may just test the web-app part without all chrome APIs part; is there a way to do a distribution as a webapp? Another question, can we target to electron in the future?
2 replies