Skip to content

./hello run results in undefined #2

@ghost

Description

I've tried tinkering with just(js) on MacOS using the docker images you provided me with.

  1. At first, I built justjs/just:debian (debian image) using make debian and tried to follow the instructions outlined here. Commands that I ran inside the Debian container:
$ just init hello
$ cd hello
$ just build hello.js --clean --static

After the last command, I received the following error:
Screenshot 2021-03-26 at 22 27 23

Could you explain what's the problem?

  1. After that I decided to try make distroless, the same problem.

  2. Eventually, I decided to change the strategy and try to use the builder image. I've built it and jumped right into the container's shell.
    Inside the just directory, I decided to make :)

$ make -C just-0.0.22 install
$ export JUST_TARGET=$JUST_HOME

I cded (using cd ..) back from the just/ directory. Then again, I executed:

$ just init hello
$ cd hello
$ ls
config.json  hello.js
$ just build hello.js --clean --static

I suppose the build was successful:
Screenshot 2021-03-26 at 22 39 57

$ ls
config.json  hello  hello.js
$ ./hello
undefined
$ just hello.js # the same result
undefined

Is this an expected behavior? :)

UPD. just eval "just.print(just.memoryUsage().rss)" works just fine outputting int value

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions