You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to run this lib inside the cloudflare workers (if possible) and currently its failing due to usage of _dirname global var. Could where we use __dirname replace it with helper function that uses __dirname if defined otherwise import.meta.dirname or something.
✘ [ERROR] service core:user:extractor: Uncaught ReferenceError: __dirname is not defined
at null.<anonymous> (worker.js:9810:156)
at null.<anonymous> (worker.js:7360:58)
at null.<anonymous> (worker.js:16846:17) in
node_modules/.pnpm/[email protected]/node_modules/playwright-core/lib/utilsBundleImpl/index.js
at null.<anonymous> (worker.js:32:50) in __require2
at null.<anonymous> (worker.js:16901:37) in
node_modules/.pnpm/[email protected]/node_modules/playwright-core/lib/utilsBundle.js
at null.<anonymous> (worker.js:32:50) in __require2
at null.<anonymous> (worker.js:28823:25) in
node_modules/.pnpm/[email protected]/node_modules/playwright-core/lib/server/registry/index.js
at null.<anonymous> (worker.js:32:50) in __require2
at null.<anonymous> (worker.js:76867:21) in
node_modules/.pnpm/[email protected]/node_modules/playwright-core/lib/server/index.js
at null.<anonymous> (worker.js:32:50) in __require2
I suspect there may be other issues like access to FS that may prevent this from ever working.
I am also planning on using browserbase browser always so it would be nice if env was "BROWSERBASE" none of this code is included to avoid the issue. Maybe a better solution could be to have different bundled exports for LOCAL and BROWSERBASE instead of env flag so if we import StagehandExternal it doesn't include any browser code, and StagehandLocal does?
The text was updated successfully, but these errors were encountered:
I would like to run this lib inside the cloudflare workers (if possible) and currently its failing due to usage of
_dirname
global var. Could where we use__dirname
replace it with helper function that uses__dirname
if defined otherwiseimport.meta.dirname
or something.I suspect there may be other issues like access to FS that may prevent this from ever working.
I am also planning on using browserbase browser always so it would be nice if env was "BROWSERBASE" none of this code is included to avoid the issue. Maybe a better solution could be to have different bundled exports for LOCAL and BROWSERBASE instead of env flag so if we import
StagehandExternal
it doesn't include any browser code, andStagehandLocal
does?The text was updated successfully, but these errors were encountered: