PrestonKnopp / language-gdscript

gdscript language grammar package for atom.io
https://atom.io/packages/lang-gdscript
MIT License
32 stars 9 forks source link

params.scopes[key].split is not a function #16

Closed davincif closed 4 years ago

davincif commented 5 years ago

[Enter steps to reproduce:]

  1. install the extention
  2. close you atom and open it again

Atom: 1.28.0 x64 Electron: 2.0.3 OS: Linux Mint Thrown From: lang-gdscript package 4.1.1

Stack Trace

Failed to load a lang-gdscript package grammar

At params.scopes[key].split is not a function in /home/scar/.atom/packages/lang-gdscript/grammars/tree-sitter-gdscript.cson

TypeError: params.scopes[key].split is not a function
    at new TreeSitterGrammar (/usr/share/atom/resources/app/src/tree-sitter-grammar.js:33:16)
    at GrammarRegistry.createGrammar (/usr/share/atom/resources/app/src/grammar-registry.js:494:20)
    at CSON.readFile (/usr/share/atom/resources/app/src/grammar-registry.js:476:35)
    at /usr/share/atom/resources/app/node_modules/season/lib/cson.js:223:65
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
  at /packages/lang-gdscript/grammars/tree-sitter-gdscript.cson:1:1

Non-Core Packages

atom-darker-syntax 0.3.0 
atom-live-server 2.3.0 
atom-overtype-mode 0.4.0 
autoclose-html 0.23.0 
autocomplete-python 1.14.0 
base16-darker-high-contrast-syntax 1.5.1-0 
busy-signal 2.0.1 
color-picker 2.3.0 
darker-one-dark-syntax 1.1.0 
django-atom 0.2.4 
dockerletion 0.2.0 
file-icons 2.1.31 
file-watcher 2.0.0 
framer-ui 2.0.0 
go-plus 6.1.0 
go-tip 2.4.0 
go-types 1.2.1 
goto-definition 1.3.4 
highlight-selected 0.16.0 
ide-go 0.12.3 
ide-json 0.2.1 
intentions 1.1.5 
lang-gdscript 4.1.1 
language-docker 1.1.8 
language-lua 0.9.11 
language-nginx 0.8.0 
language-pug 0.0.22 
linter 2.3.0 
linter-docker 0.3.2 
linter-lua 2.0.0 
linter-pug 2.0.4 
linter-ui-default 1.7.1 
minimap 4.29.9 
minimap-highlight-selected 4.6.1 
minimap-pigments 0.2.2 
monokai-darker 1.3.2 
pigments 0.40.2 
pretty-json 2.1.2 
teletype 0.13.3 
todo 0.6.0 
PrestonKnopp commented 5 years ago

This is an atom issue. Are you able to install the latest version of atom (v1.36)?

PrestonKnopp commented 5 years ago

I increased the latest compatible to my knowledge atom engine version . I thought if it failed to load the tree-sitter grammar it would fallback to the textmate grammar. I probably misread that somewhere.

davincif commented 5 years ago

Sorry for the delay. I think it's already working. But honestly I really don't remember if I had updated (probably I did). But the point is that updateded atom just now to version 1.36.1 and it's working just fine.

Thank you.

PrestonKnopp commented 5 years ago

Okay, cool. I'm glad it's working. Thank you for posting an issue!

TheSHEEEP commented 4 years ago

This is happening again with Atom 1.47.0.

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.47.0 x64 Electron: 5.0.13 OS: "Manjaro Linux" Thrown From: lang-gdscript package 5.1.1

Stack Trace

Failed to load a lang-gdscript package grammar

At The module '/home/thesheeep/.atom/packages/lang-gdscript/node_modules/tree-sitter-godot-resource/build/Release/tree_sitter_godotResource_binding.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 69. This version of Node.js requires
NODE_MODULE_VERSION 70. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`). in /home/thesheeep/.atom/packages/lang-gdscript/grammars/tree-sitter-godot-resource.json

Error: The module '/home/thesheeep/.atom/packages/lang-gdscript/node_modules/tree-sitter-godot-resource/build/Release/tree_sitter_godotResource_binding.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 69. This version of Node.js requires
NODE_MODULE_VERSION 70. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at process.func [as dlopen] (electron/js2c/asar.js:138:31)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:881:18)
    at Object.func [as .node] (electron/js2c/asar.js:138:31)
    at Module.load (internal/modules/cjs/loader.js:701:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:633:12)
    at Function.Module._load (internal/modules/cjs/loader.js:625:3)
    at Module.require (internal/modules/cjs/loader.js:739:19)
    at require (/usr/lib/atom/src/native-compile-cache.js:68:27)
    at /packages/lang-gdscript/node_modules/tree-sitter-godot-resource/index.js:2:20)
    at /packages/lang-gdscript/node_modules/tree-sitter-godot-resource/index.js:11:3)
    at Module._compile (/usr/lib/atom/src/native-compile-cache.js:121:30)
    at Object.value [as .js] (/usr/lib/atom/src/compile-cache.js:255:23)
    at Module.load (internal/modules/cjs/loader.js:701:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:633:12)
    at Function.Module._load (internal/modules/cjs/loader.js:625:3)
    at Module.require (internal/modules/cjs/loader.js:739:19)
    at require (/usr/lib/atom/src/native-compile-cache.js:68:27)
    at new TreeSitterGrammar (/usr/lib/atom/src/tree-sitter-grammar.js:61:27)
    at GrammarRegistry.createGrammar (/usr/lib/atom/src/grammar-registry.js:604:14)
    at /usr/lib/atom/src/grammar-registry.js:583:29
    at parseContents (/usr/lib/atom/node_modules/season/lib/cson.js:119:7)
    at /usr/lib/atom/node_modules/season/lib/cson.js:226:20
    at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:54:3)
  at /packages/lang-gdscript/grammars/tree-sitter-godot-resource.json:1:1

Commands

Non-Core Packages

atom-beautify 0.33.4 
atom-jinja2 0.6.0 
atom-typescript 13.6.0 
autoclose-html 0.23.0 
block-comment 0.4.3 
bracket-close-jump 0.2.0 
busy-signal 2.0.1 
copy-find-results 0.2.0 
docblockr 0.13.7 
escape-utils 0.5.3 
file-types 1.0.1 
fold-lines 0.2.2 
git-control 0.9.0 
git-plus 8.7.1 
haxe-import 1.2.1 
haxe-newfile 0.5.0 
indentation-indicator 1.1.0 
intentions 1.1.5 
lang-gdscript 5.1.1 
language-batch 0.4.0 
language-bbcode 0.1.1 
language-brainfuck 0.2.0 
language-cmake 1.2.0 
language-doxygen 0.7.0 
language-haxe 0.6.0 
language-powershell 5.0.0 
language-vbscript 0.9.0 
last-cursor-position 0.9.3 
lime 0.3.5 
line-count 0.5.2 
linter 2.3.1 
linter-tslint 1.10.43 
linter-ui-default 1.8.1 
markdown-preview-plus 3.11.5 
markdown-writer 2.11.10 
open-recent 5.0.0 
pretty-json 2.1.2 
python-debugger 0.2.0 
python-tools 0.6.9 
tabs-to-spaces 1.0.5 
tabular 0.1.0 
tidy-tabs 0.4.0 
PrestonKnopp commented 4 years ago

Hi, thanks for bringing this to my attention. I have uploaded binaries for module version 70. Try rebuilding the package or, if that fails, reinstalling lang-gdscript. Let me know if that works.

PrestonKnopp commented 4 years ago

Closing again as the appended issue is expected and different from the initial issue. Additionally, changed title for atom's issue reporter.