Closed emrul closed 2 years ago
I can confirm I have the same issue, and I am not using --unstable
.
deno --version deno 1.17.1 (release, x86_64-pc-windows-msvc) v8 9.7.106.15 typescript 4.5.2
I used to get: Uncaught ReferenceError: Cannot access 'Response'
see: https://github.com/denoland/deno/issues/12086 but that seems solved now.
Instead the error has now changed to: ReferenceError: Cannot access 'NodeTypeError' before initialization
The only lib I am using is: https://deno.land/x/denodb/mod.ts
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
I have tried the latest Deno release (1.17.0) and also tried canary and I am facing an error
error: Uncaught (in promise) ReferenceError: Cannot access 'NodeTypeError' before initialization
when running my script - viadeno bundle
anddeno compile
. The script works fine when executed viadeno run
. I am not sure if the fact that I need--unstable
is causing this?Trying to run the output of
deno bundle
gives me this:and indeed, I can see the class
NodeTypeError
is extended before it has been declared.Any pointers would be greatly appreciated.
Reproduction steps:
dev
branchscripts/js
directorydeno run --allow-all --unstable ./tg.js --help
works (prints usage info.)deno bundle --unstable tg.js tg.bundle.js
to create bundledeno run --allow-all ./tg.bundle.js --help
and observe that ReferenceError is thrown.Originally posted by @emrul in https://github.com/denoland/deno/issues/12086#issuecomment-999151689