Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploying with a blank file ends in a terrible error #2744

Open
lastmjs opened this issue Feb 25, 2025 · 0 comments
Open

Deploying with a blank file ends in a terrible error #2744

lastmjs opened this issue Feb 25, 2025 · 0 comments
Milestone

Comments

@lastmjs
Copy link
Member

lastmjs commented Feb 25, 2025

We should create a pretty error or no error for deploying a canister with an empty main file, but we currently get this:

Azle BuildError: Error: Error: cannot set property '_azleShouldRegisterCanisterMethods' of undefined
    at getExportedCanisterClassInstance (.azle/agent/main.js:4957:5)
    at <anonymous> (.azle/agent/main.js:4930:37)

    at trap (/home/lastmjs/development/azle/src/build/stable/commands/compile/candid_and_method_meta/execute.ts:76:23)
    at wasm://wasm/00c98e8a:wasm-function[2915]:0x2138f4
    at wasm://wasm/00c98e8a:wasm-function[1079]:0x1b2938
    at wasm://wasm/00c98e8a:wasm-function[90]:0x7d0ba
    at wasm://wasm/00c98e8a:wasm-function[3244]:0x214f5e
    at execute (/home/lastmjs/development/azle/src/build/stable/commands/compile/candid_and_method_meta/execute.ts:95:7)
    at handleAutomaticAndCustom (/home/lastmjs/development/azle/src/build/stable/commands/compile/candid_and_method_meta/index.ts:45:42)
    at async getCandidAndMethodMeta (/home/lastmjs/development/azle/src/build/stable/commands/compile/candid_and_method_meta/index.ts:20:16)
    at async runCommand (/home/lastmjs/development/azle/src/build/stable/commands/compile/index.ts:26:36)
    at async handleCompileCommand (/home/lastmjs/development/azle/src/build/index.ts:151:9)

@lastmjs lastmjs added this to the 1.0 milestone Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant