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 have a type: module project and it looks like that's tripping this library up. In canvaskit-wasm (a dep of the project) __dirname is used which results in this error:
▶ src/pages/articles/index.astro
└─ /articles/index.html (+6ms)
error __dirname is not defined in ES module scope
File:
/Users/alan/src/alan.norbauer.com-astro-v2/dist/chunks/pages/open-graph.ts.6ecf069b.mjs:35419:43
Code:
35418 | arguments.length;};})();})(w);var sa=Object.assign({},w),va="./this.program",wa=(a,b)=>{throw b;},xa="object"==typeof window,ya="function"==typeof importScripts,za="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,Ba="",Ca,Da,Ea,fs,Fa,Ga;
> 35419 | if(za)Ba=ya?require$$0$1.dirname(Ba)+"/":__dirname+"/",Ga=()=>{Fa||(fs=require$$1,Fa=require$$0$1);},Ca=function(a,b){Ga();a=Fa.normalize(a);return fs.readFileSync(a,b?void 0:"utf8")},Ea=a=>{a=Ca(a,!0);a.buffer||(a=new Uint8Array(a));return a},Da=(a,b,d)=>{Ga();a=Fa.normalize(a);fs.readFile(a,function(f,h){f?d(f):b(h.buffer);});},1<process.argv.length&&(va=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),process.on("unhandledRejection",function(a){throw a;}),wa=(a,b)=>{if(noExitRuntime)throw process.exitCode=
| ^
The text was updated successfully, but these errors were encountered:
I have a
type: module
project and it looks like that's tripping this library up. In canvaskit-wasm (a dep of the project)__dirname
is used which results in this error:The text was updated successfully, but these errors were encountered: