ReferenceError when running bundled v1.0.40
jackfiszr opened this issue · comments
I know there were some SWC issues but the Deno versions affected are 1.14.0 to 1.16.4 and I am using 1.16.4+canary where the problem is fixed and 1.13.2 where the problem did not exist yet.
$ deno -V
deno 1.16.4+5fe4d5c
$ deno bundle https://deno.land/x/denodb@v1.0.40/mod.ts denodb-bundle.js
Check https://deno.land/x/denodb@v1.0.40/mod.ts
Bundle https://deno.land/x/denodb@v1.0.40/mod.ts
Emit "denodb-bundle.js" (3.71MB)
$ deno run denodb-bundle.js
error: Uncaught ReferenceError: Cannot access 'NodeTypeError' before initialization
class ERR_INVALID_ARG_TYPE extends NodeTypeError {
^
at file:///home/jacek/dev/denodb-bundle.js:6302:36
You have to use the --no-check flag when bundling with Deno 1.13.2 but otherwise it's exactly the same.
Edit: the error is actually thrown by std/node which is used in one of the dependencies: Zhomart/dex.
Probably related to Deno issue 13061
This issue has been fixed in std@0.123.0 (with). Will the deps be updated to not use an earlier version of std/node?
OK, it turns out std/node was used without a version tag, so after --reload everything works fine.