Skip to content

Playground not working with "Uncaught TypeError: tree is not defined" #1300

@ahelwer

Description

@ahelwer

I've been trying to get the playground to work with my grammar but when the web UI pops up in Firefox or Chrome I just get this error and nothing works:

RuntimeError: abort(Assertion failed: bad export type for `_ZTVN10__cxxabiv117__class_type_infoE`: undefined). Build with -s ASSERTIONS=1 for more info.
    ee http://127.0.0.1:8000/tree-sitter.js:1
    S http://127.0.0.1:8000/tree-sitter.js:1
    be http://127.0.0.1:8000/tree-sitter.js:1
    M http://127.0.0.1:8000/tree-sitter.js:1
    p http://127.0.0.1:8000/tree-sitter.js:1

If I type then I get this error over & over:

Uncaught TypeError: tree is undefined
    handleCursorMovement http://127.0.0.1:8000/playground.js:326
    later http://127.0.0.1:8000/playground.js:453
    setTimeout handler*debounce/< http://127.0.0.1:8000/playground.js:457
    Gn https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.45.0/codemirror.min.js:1
    Gn https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.45.0/codemirror.min.js:1
    Gn https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.45.0/codemirror.min.js:1
    Xn https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.45.0/codemirror.min.js:1
    poll https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.45.0/codemirror.min.js:1
    init https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.45.0/codemirror.min.js:1

Am I doing something obviously wrong?

Version Info:

  • emcc 2.0.16
  • tree-sitter-cli 0.20.0
  • Windows 10
  • Firefox 90.0.2
  • Chrome 92.0.4515.107

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions