code-server icon indicating copy to clipboard operation
code-server copied to clipboard

Code Spell Checker extension crashes

Open ymmt2005 opened this issue 7 years ago • 8 comments

  • code-server version: 1.31.0-20
  • OS Version: Ubuntu 18.04
  • Extension: https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker

Steps to Reproduce

  1. Download vsix file of the extension.
  2. Unzip vsix and copy extension directory under ~/.code-server/extensions/streetsidesoftware.code-spell-checker-1.6.10
  3. Enable the extension in code-server.
  4. The extension crashes with the following error message:
Error: Cannot find module 'vscode-languageserver'
    at Function.Module._resolveFilename (module.js:536:15)
    at Function.Module._load (module.js:466:25)
    at Module.require (module.js:579:17)
    at Module.r.require.e [as require] (/usr/local/bin/code-server:468:26234)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/ymmt/.vscode/extensions/streetsidesoftware.code-spell-checker-1.6.10/server/src/server.js:4:33)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
[Info  - 10:44:40] Connection to server got closed. Server will restart.

ymmt2005 avatar Mar 07 '19 01:03 ymmt2005

Same issue with TSLint.

jondavidschober avatar Mar 14 '19 04:03 jondavidschober

Same issue with https://github.com/codercom/code-server/issues/200#issuecomment-472239389

ymmt2005 avatar Mar 14 '19 08:03 ymmt2005

It doesn't work for me either, ESLint outputs the follwing in the Output tab when selcting ESLint on the right:

[Info  - 15:44:10] ESLint server stopped.
[Info  - 15:44:12] ESLint server running in node v8.15.0
[Info  - 15:44:12] ESLint server is running.
 ›   Error: Unexpected arguments: var p = 
 ›   process;p.on('message',function(m){if(m.c==='e'){p.exit(0);}else 
 ›   if(m.c==='rs'){try{var 
 ›   r=require.resolve(m.a);p.send({c:'r',s:true,r:r});}catch(err){p.send({c:'r
 ›   ',s:false});}}});, 
 ›   See more help with --help

dbaeumer.vscode-selint version: 1.8.2 Note: I copied ESLint from my Windows machine to the extensions folder of code-server, might be relevant.

schrej avatar Mar 25 '19 15:03 schrej

@schrej Change the version of node, Eslint work with build-in node by default. Open settings,then set eslint.runtime to your local node. It works to me both Debian and Mac.

zigego avatar Mar 25 '19 16:03 zigego

@zigego Thank you! After setting "eslint.runtime": "/usr/bin/node" ESLint works fine and shows issues in the editor.

schrej avatar Mar 25 '19 16:03 schrej

@ymmt2005 It appears that the current version of Code Spell Checker is quite outdated and using some invalid dependencies, which means that it is unpackageable. I'm seeing the same errors as the current failing build.

I've created an issue on the extension's repo: https://github.com/Jason-Rev/vscode-spell-checker/issues/318

foresthoffman avatar Mar 25 '19 18:03 foresthoffman

@foresthoffman Thank you very much for your investigation.

I'm going to close this issue. Code spell checker is a must have for me so I hope someday it is packaged for code-server.

code-server is simply great. Thank you, and keep going!

ymmt2005 avatar Mar 25 '19 19:03 ymmt2005

https://github.com/Jason-Rev/vscode-spell-checker/issues/318 was merged this morning, so now the build works properly. I've got a PR up that should allow the spell checker build to be automated properly.

foresthoffman avatar Apr 19 '19 23:04 foresthoffman