cmorten / opine

Minimalist web framework for Deno ported from ExpressJS.
https://github.com/cmorten/opine/blob/main/.github/API/api.md
MIT License
854 stars 43 forks source link

Compiled executables don't work #107

Closed zsombro closed 3 years ago

zsombro commented 3 years ago

Issue

Setup:

Details

I have replicated the Eta templating example for Opine and while the example itself worked, when I try to compile this program to a Windows executable, I get the following error upon running it:

error: ReferenceError: to is not defined
    at Function.app1.on (file://$deno$/bundle.js:30032:42)
    at Function.defaultConfiguration (file://$deno$/bundle.js:28769:10)
    at Function.init (file://$deno$/bundle.js:28756:10)
    at opine (file://$deno$/bundle.js:30051:10)
    at file://$deno$/bundle.js:32779:14

I have tried compiling executables before, but they only used standard libraries. I assumed this might be a problem with opine, as the callstack in that error message refers to it. I don't know if there are any command line arguments that could help in producing a more helpful error log

cmorten commented 3 years ago

Heya @zsombro 👋

I've just released 1.2.0 - please can you confirm whether you are still facing issues?

I am able to compile and run the eta example in this codebase with this latest version - see video.

https://user-images.githubusercontent.com/11313985/110216322-6f2fb300-7ea6-11eb-949a-8719b99e2abe.mov

If you're still facing issues, please could you share a minimal code example ( code block / gist ) so I can use that to reproduce and work on a fix? 😄

zsombro commented 3 years ago

Hey @cmorten thank you for the quick response!

I have tried the new version and it works fine! Awesome!