Unable to use deno compile/bundle with Input due to ReferenceError
See original GitHub issueHi
I like the library a lot, thanks for working on it. However, I am running into an issue I am not familiar with:
System Windows 10 Deno 1.7.2
Issues
Scenario 1 (compile)
deno compile -o test --unstable https://deno.land/x/cliffy/examples/prompt/input.ts
./test.exe
Result 1
error: ReferenceError: Cannot access 'mod' before initialization
at factory (file://$deno$/bundle.js:355:39)
at file://$deno$/bundle.js:83:14
Scenario 2 (bundle)
deno bundle --unstable https://deno.land/x/cliffy/examples/prompt/input.ts test.js
deno run --unstable ./test.js
Result 2
error: Uncaught ReferenceError: Cannot access 'mod' before initialization
const methodList = Object.entries(mod);
^
at factory (file:///C:/Users/..../test.js:355:39)
at file:///C:/Users/..../test.js:83:14
Notes
- The closest issue I’ve found that resembles it is https://github.com/denoland/deno/issues/8211
- The line that seems to be involved is https://github.com/c4spar/deno-cliffy/blob/598692727a4302ef5c5438f0d018956e4107a6a7/ansi/tty.ts#L69
Questions
- Any thoughts why this may be?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Uncaught ReferenceError when running bundle created with ...
I'm getting runtime errors when executing bundles created with Deno 1.5.x that I didn't get in 1.4.6: main.ts: example % cat main.ts import ......
Read more >deno bundle | Manual
Bundling. deno bundle [URL] will output a single JavaScript file for consumption in Deno, which includes all dependencies of the specified input.
Read more >How To Fix ReferenceError require is not defined in JavaScript
You tried using require in a browser environment; You are in a Node.js environment but your project has "type": "module" in its package.json....
Read more >javascript - Uncaught ReferenceError: process is not defined
I am using the command "npm start" which refers to the "start" script inside package.json that is set to "start": "http-server -a localhost...
Read more >Firebase JavaScript SDK Release Notes - Google
Fixed the Node.js ESM bundle to build from the Node.js entry point (it was incorrectly using the browser entry point). See Github issue...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have created a deno issue: https://github.com/denoland/deno/issues/9467
Hi @c4spar, it works. Thank you.