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
Thanks for quick fixing #164
Now I am able to esbuild a code using quickjs-emscripten that leverages new URL(..., import.meta.url).
However, I noticed that the built JS throws a runtime error: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received undefined.
A runtime error TypeError [ERR_INVALID_ARG_VALUE]: The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received undefined is thrown, since import_meta.url is undefined.
Repro
git clone --branch=import-meta-url https://github.com/exoego/quickjs-emscripten-esbuild-repro.git
cd quickjs-emscripten-esbuild-repro
npm i
npm run build
The text was updated successfully, but these errors were encountered:
Thanks for quick fixing #164
Now I am able to esbuild a code using quickjs-emscripten that leverages
new URL(..., import.meta.url)
.However, I noticed that the built JS throws a runtime error:
TypeError [ERR_INVALID_ARG_VALUE]: The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received undefined
.The below is a part of generated JS.
This error happens in CommonJS build.
I need to use CommonJS build since some other dependencies does not work with ESM for other reasons.
If I change the build to ESM, the generated artifact run successfully since
import.meta.url
is preserved and ESM supports it.Expectation
CommonJS mode is supported
Actual
A runtime error
TypeError [ERR_INVALID_ARG_VALUE]: The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received undefined
is thrown, sinceimport_meta.url
is undefined.Repro
The text was updated successfully, but these errors were encountered: