Skip to content

Can't use runtime because File.executable? returns false #106

@theo-bittencourt

Description

@theo-bittencourt

Hey guys,

Something weird here. I'm getting the error below when trying to start the Docker container:

ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime.

After some debugging, I found a strange behavior on ExecJS::ExternalRuntime.locate_executable , where the File.executable?(full_path) is returning false, although the /usr/bin/node executable is present.

pry> File.stat('/usr/bin/node').owned?
=> true

pry(#<ExecJS::ExternalRuntime>)> File.executable?('/usr/bin/node')
=> false

pry(#<ExecJS::ExternalRuntime>)> File.file?('/usr/bin/node')
=> true

File.executable?(full_path) && File.file?(full_path)

== Stack ==
Docker
Ruby 2.7.4
ExecJS 2.8.1

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