Cannot read property 'base64encode' of undefined

(SystemJS) Cannot read property 'base64encode' of undefined
    TypeError: Cannot read property 'base64encode' of undefined
        at Object.base64encode (http://localhost:3000/node_modules/typescript/lib/typescript.js:12103:18)
        at Object.getSourceMappingURL (http://localhost:3000/node_modules/typescript/lib/typescript.js:74018:46)
        at printSourceFileOrBundle (http://localhost:3000/node_modules/typescript/lib/typescript.js:74639:48)
        at emitJsFileOrBundle (http://localhost:3000/node_modules/typescript/lib/typescript.js:74588:13)
        at emitSourceFileOrBundle (http://localhost:3000/node_modules/typescript/lib/typescript.js:74545:13)
        at forEachEmittedFile (http://localhost:3000/node_modules/typescript/lib/typescript.js:74454:30)
        at Object.emitFiles (http://localhost:3000/node_modules/typescript/lib/typescript.js:74535:9)
        at emitWorker (http://localhost:3000/node_modules/typescript/lib/typescript.js:79069:33)
        at http://localhost:3000/node_modules/typescript/lib/typescript.js:79029:66
        at runWithCancellationToken (http://localhost:3000/node_modules/typescript/lib/typescript.js:79120:24)
    Error loading http://localhost:3000/doom3TokenizerTest.ts

应该是缺少依赖,或者版本不兼容吧

您好,我是有问必答小助手,你的问题已经有小伙伴为您解答了问题,您看下是否解决了您的问题,可以追评进行沟通哦~

如果有您比较满意的答案 / 帮您提供解决思路的答案,可以点击【采纳】按钮,给回答的小伙伴一些鼓励哦~~

ps:问答VIP仅需29元,即可享受5次/月 有问必答服务,了解详情>>>https://vip.csdn.net/askvip?utm_source=1146287632

20以下版本出现的问题。

可以使用20版本以上的systemjs,但是20以上不支持config,需要支持ts的话,安装systemjs-babel即可(import的文件需要明确扩展名)