banacorn / language-agda

Agda language support for the Atom editor
https://atom.io/packages/language-agda
MIT License
13 stars 5 forks source link

Failed to load a language-agda package grammar #24

Open nasherm opened 4 years ago

nasherm commented 4 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.41.0 x64 Electron: 4.2.7 OS: Mac OS X 10.14.6 Thrown From: language-agda package 1.2.0

Stack Trace

Failed to load a language-agda package grammar

At The module '/Users/nashe/.atom/packages/language-agda/node_modules/tree-sitter-agda/build/Release/tree_sitter_agda_binding.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 69. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`). in /Users/nashe/.atom/packages/language-agda/grammars/tree-sitter-agda.cson

Error: The module '/Users/nashe/.atom/packages/language-agda/node_modules/tree-sitter-agda/build/Release/tree_sitter_agda_binding.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 69. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:160:31)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:722:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:160:31)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
    at Function.Module._load (internal/modules/cjs/loader.js:533:3)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:146745)
    at /packages/language-agda/node_modules/tree-sitter-agda/index.js:2:20)
    at /packages/language-agda/node_modules/tree-sitter-agda/index.js:15:3)
    at Module.get_Module._compile (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:147429)
    at Object.value [as .js] (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:150977)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
    at Function.Module._load (internal/modules/cjs/loader.js:533:3)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (internal/modules/cjs/helpers.js:20:18)
    at customRequire (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:1:688212)
    at new TreeSitterGrammar (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:3131248)
    at GrammarRegistry.createGrammar (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:360047)
    at l.readFile (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:359888)
    at /Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:581849
    at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
  at /packages/language-agda/grammars/tree-sitter-agda.cson:1:1

Commands

Non-Core Packages

agda-mode 0.9.9 
atom-ide-ui 0.13.0 
atom-latex 0.8.11 
autocomplete-haskell 1.0.1 
ex-mode 0.18.0 
gcc-make-run 0.2.12 
highlight-line 0.12.0 
highlight-selected 0.16.0 
ide-haskell 2.4.1 
ide-scala 0.11.0 
keybinding-cheatsheet 0.1.1 
language-agda 1.2.0 
language-cmake 1.2.0 
language-coconut 0.2.0 
language-docker 1.1.8 
language-haskell 1.19.1 
language-latex 1.2.0 
language-ocaml 1.9.5 
language-rust 0.4.12 
language-scala 1.1.10 
latex 0.50.2 
minimap 4.29.9 
pdf-view 0.72.0 
platformio-ide-terminal 2.9.4 
script 3.18.1 
vim-mode-plus 1.36.2 
banacorn commented 4 years ago

I guess this happens after upgrading Atom. Please uninstsall and then reinstall and the problem should go away (I should put this in README)

shhyou commented 4 years ago

I saw this issue as well. After uninstalling language-agda, I can't install it anymore:

Installing “language-agda@1.2.0” failed.Hide output…

> tree-sitter-agda@1.2.1 install /private/var/folders/yn/l09rsn154v773c4pnvd58f_r0000gn/T/apm-install-dir-119107-76548-xd46ok.cewl9/node_modules/language-agda/node_modules/tree-sitter-agda
> prebuild-install || npx node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=3.1.10 runtime=node arch=x64 libc= platform=darwin)
sh: npx: command not found
npm WARN enoent ENOENT: no such file or directory, open '/private/var/folders/yn/l09rsn154v773c4pnvd58f_r0000gn/T/apm-install-dir-119107-76548-xd46ok.cewl9/package.json'
npm WARN apm-install-dir-119107-76548-xd46ok.cewl9 No description
npm WARN apm-install-dir-119107-76548-xd46ok.cewl9 No repository field.
npm WARN apm-install-dir-119107-76548-xd46ok.cewl9 No README data
npm WARN apm-install-dir-119107-76548-xd46ok.cewl9 No license field.

npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! tree-sitter-agda@1.2.1 install: `prebuild-install || npx node-gyp rebuild`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the tree-sitter-agda@1.2.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/shhyou/.atom/.apm/_logs/2019-11-07T23_51_33_681Z-debug.log

Googling shows that [https://stackoverflow.com/questions/49894620/npx-command-not-found](`npxis some NPM package). Even after installingnpxmanually, another error about Python binary andgyp` shows up.

I am using Atom 1.40. I'll see if upgrading to Atom 1.41 resolves the issue.