markmap / markmap-vscode

Integrate markmap into VSCode
https://marketplace.visualstudio.com/items?itemName=gera2ld.markmap-vscode
MIT License
228 stars 22 forks source link

如何编译代码 #12

Closed xsro closed 3 years ago

xsro commented 3 years ago

我在编译时总是出现这个错误

SyntaxError: E:\GitRepo\vscext\markmap-vscode\src\extension.ts: Unexpected token, expected "{" (30:20)    

  28 | const transformer = new Transformer();
  29 | 
> 30 | class MarkmapEditor implements CustomTextEditorProvider {
     |                     ^
  31 |   static readonly viewType = 'markmap-vscode.markmap';
  32 | 
  33 |   constructor(public context: ExtensionContext) {}
    at Parser._raise (E:\gitrepo\vscext\markmap-vscode\node_modules\@babel\parser\lib\index.js:799:17)
    at Parser.raiseWithData (E:\gitrepo\vscext\markmap-vscode\node_modules\@babel\parser\lib\index.js:792:17)        
    at Parser.raise (E:\gitrepo\vscext\markmap-vscode\node_modules\@babel\parser\lib\index.js:786:17)
    at Parser.unexpected (E:\gitrepo\vscext\markmap-vscode\node_modules\@babel\parser\lib\index.js:9089:16)
    at Parser.expect (E:\gitrepo\vscext\markmap-vscode\node_modules\@babel\parser\lib\index.js:9075:28)
    at Parser.parseClassBody (E:\gitrepo\vscext\markmap-vscode\node_modules\@babel\parser\lib\index.js:12365:10)     
    at Parser.parseClass (E:\gitrepo\vscext\markmap-vscode\node_modules\@babel\parser\lib\index.js:12339:22)
    at Parser.parseStatementContent (E:\gitrepo\vscext\markmap-vscode\node_modules\@babel\parser\lib\index.js:11619:21)
    at Parser.parseStatement (E:\gitrepo\vscext\markmap-vscode\node_modules\@babel\parser\lib\index.js:11577:17)     
    at Parser.parseBlockOrModuleBlockBody (E:\gitrepo\vscext\markmap-vscode\node_modules\@babel\parser\lib\index.js:12159:25)
[00:29:27] 'build' errored after 2.4 s
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
终端进程“C:\Windows\System32\cmd.exe /d /c yarn run build”已终止,退出代码: 1。
gera2ld commented 3 years ago

啥环境信息也没有,我也不知道呀,自己调试下吧。