Skip to content

Error in basic example #293

@raky291

Description

@raky291

I don't understand what is wrong, someone can help me?

# main.rb
require 'babel/transpiler'
Babel::Transpiler.transform '[1, 2, 3].map(n => n + 1);'

Error output:

C:\...\...\...\GitHub\babel>ruby main.rb
(execjs):1: ExecJS::RuntimeError
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:184:in `exec_runtime'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:39:in `exec'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:14:in `initialize'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/execjs-2.7.0/lib/execjs/runtime.rb:57:in `new'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/execjs-2.7.0/lib/execjs/runtime.rb:57:in `compile'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/execjs-2.7.0/lib/execjs/module.rb:27:in `compile'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/babel-transpiler-0.7.0/lib/babel/transpiler.rb:24:in `context'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/babel-transpiler-0.7.0/lib/babel/transpiler.rb:28:in `transform'
        from main.rb:2:in `<main>'

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