jashkenas/coffeescript

Bug?: Cannot Base64 encode value: 0 (Legacy browser/WSH)

gnh1201 opened this issue · 2 comments

Hello.

I am trying to port CoffeeScript to WSH based project.

As far as I know, CoffeeScript supports IE. The JavaScript engine used in WSH is compatible with legacy IE JavaScript.

Actually, there was no problem loading and there was a problem when using it.

https://github.com/gnh1201/welsonjs/blob/master/app.js#L221

Input Code

app.js

    // T is the raw content of helloworld.coffee
    if (suffix === '.coffee' && typeof CoffeeScript !== "undefined") {
        T = CoffeeScript.compile(T, {
            "bare": true,
            "shiftLine": true
        });
    }

helloworld.coffee

console.log "Hello world"

Expected Behavior

print hello world

Current Behavior

Exception Cannot Base64 encode value: 0 (related to BASE64_CHARS variable)

Possible Solution

Currently, Have no idea.

Context

The same with above.

Environment

  • CoffeeScript version: 2.7.0
  • Node.js version: No node, WSH 5.812/Windows 10

I'll investigate this issue further and reopen it.

I finished porting CoffeeScript and it works fine :) I solved this by adding a compile-only layer.