frankwallis / plugin-typescript

TypeScript loader for SystemJS
MIT License
248 stars 47 forks source link

Does not work with typescript 2.9.1 and above #218

Closed mlvtito closed 6 years ago

mlvtito commented 6 years ago

Hello,

I'm using jspm 0.17.0-beta.49 and plugin-typescript 9.0.0.

At least for version 2.9.1 and 2.9.2, I had this exception when I try to bundle my app :

Unhandled rejection (SystemJS) Cannot read property 'from' of undefined
    /tmp/test-auj/jspm_packages/npm/typescript@2.9.1/lib/typescript.js:5218
                    base64decode: Buffer.from ? function (input) {
                                         ^

    TypeError: Cannot read property 'from' of undefined
        at getNodeSystem (/tmp/test-auj/jspm_packages/npm/typescript@2.9.1/lib/typescript.js:5218:38)
        at /tmp/test-auj/jspm_packages/npm/typescript@2.9.1/lib/typescript.js:5674:19
        at ts (/tmp/test-auj/jspm_packages/npm/typescript@2.9.1/lib/typescript.js:5688:7)
        at Object.<anonymous> (/tmp/test-auj/jspm_packages/npm/typescript@2.9.1/lib/typescript.js:5698:3)
        at /tmp/test-auj/jspm_packages/npm/typescript@2.9.1/lib/typescript.js:109630:4
        at /tmp/test-auj/jspm_packages/npm/typescript@2.9.1/lib/typescript.js:109631:3
        at Script.runInThisContext (vm.js:96:20)
        at Object.runInThisContext (vm.js:303:38)
    Evaluating /tmp/test-auj/jspm_packages/npm/typescript@2.9.1/lib/typescript.js
    Error loading /tmp/test-auj/jspm_packages/github/frankwallis/plugin-typescript@9.0.0/plugin.js
mlvtito commented 6 years ago

Sorry,

Maybe I opened this issue it in the wrong place. It seems to be a compatibility problem between Node version and Typescript version.

The issue occurs with Node v10.10 and everything is ok with Node v8.12.