Skip to content

server crashed in sublime text #62

@kurokirasama

Description

@kurokirasama

Describe the bug
Getting the error: Unexpected payload in server's stdout

When installing the server, i get this output:

> [email protected] postinstall
> cd src/licensing/gui && npm install && cd ../../..


up to date, audited 1581 packages in 1s

240 packages are looking for funding
  run `npm fund` for details

8 moderate severity vulnerabilities

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

up to date, audited 519 packages in 2s

130 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

> [email protected] compile
> webpack --mode development && node ./build/makeLicensingOut.js && cd src/licensing/gui && npm run build && cd ../../.. && node ./build/copyLicensingToOut.js

assets by path utils/*.ts 10.7 KiB 11 assets
assets by path licensing/ 18.2 KiB 10 assets
assets by path providers/ 15.3 KiB 8 assets
assets by path indexing/*.ts 19.1 KiB 5 assets
assets by path lifecycle/*.ts 8.1 KiB 5 assets
assets by path debug/*.ts 6.02 KiB 3 assets
assets by path *.ts 851 bytes 3 assets
assets by path *.js 3.52 MiB 2 assets
assets by path logging/*.ts 2.03 KiB 2 assets
assets by path mvm/*.ts 1.16 KiB 2 assets
asset notifications/NotificationService.d.ts 2.54 KiB [compared for emit]
runtime modules 2.17 KiB 7 modules
modules by path ./node_modules/ 2.31 MiB
  javascript modules 2.05 MiB
    cacheable modules 2.05 MiB 337 modules
    + 4 modules
  json modules 263 KiB
    modules by path ./node_modules/iconv-lite/ 86.7 KiB 8 modules
    + 4 modules
modules by path ./src/ 910 KiB 52 modules
optional modules 168 bytes [optional]
  external "worker_threads" 42 bytes [optional] [built] [code generated]
  external "async_hooks" 42 bytes [optional] [built] [code generated]
  external "node:process" 42 bytes [optional] [built] [code generated]
  external "node:stream/web" 42 bytes [optional] [built] [code generated]
+ 34 modules

WARNING in ./node_modules/chokidar/lib/fsevents-handler.js 9:13-32
Module not found: Error: Can't resolve 'fsevents' in '/home/kira/software/MATLAB-language-server/node_modules/chokidar/lib'
 @ ./node_modules/chokidar/index.js 15:24-57
 @ ./src/lifecycle/MatlabSession.ts 46:30-49
 @ ./src/lifecycle/MatlabLifecycleManager.ts 38:24-50
 @ ./src/server.ts 45:49-94
 @ ./src/index.ts 32:28-47

WARNING in ./node_modules/express/lib/view.js 81:13-25
Critical dependency: the request of a dependency is an expression
 @ ./node_modules/express/lib/application.js 22:11-28
 @ ./node_modules/express/lib/express.js 18:12-36
 @ ./node_modules/express/index.js 11:0-41
 @ ./src/licensing/server/index.ts 17:34-52
 @ ./src/server.ts 66:17-46
 @ ./src/index.ts 32:28-47

WARNING in ./node_modules/yargs/build/index.cjs 1:437-463
Critical dependency: the request of a dependency is an expression
 @ ./node_modules/yargs/index.cjs 5:29-57
 @ ./src/utils/CliUtils.ts 28:27-43
 @ ./src/lifecycle/ConfigurationManager.ts 19:19-47
 @ ./src/server.ts 44:44-87
 @ ./src/index.ts 32:28-47

WARNING in ./node_modules/yargs/build/index.cjs 1:626-644
Critical dependency: the request of a dependency is an expression
 @ ./node_modules/yargs/index.cjs 5:29-57
 @ ./src/utils/CliUtils.ts 28:27-43
 @ ./src/lifecycle/ConfigurationManager.ts 19:19-47
 @ ./src/server.ts 44:44-87
 @ ./src/index.ts 32:28-47

WARNING in ./node_modules/yargs/build/index.cjs 1:60883-60890
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
 @ ./node_modules/yargs/index.cjs 5:29-57
 @ ./src/utils/CliUtils.ts 28:27-43
 @ ./src/lifecycle/ConfigurationManager.ts 19:19-47
 @ ./src/server.ts 44:44-87
 @ ./src/index.ts 32:28-47

WARNING in ./node_modules/yargs/build/index.cjs 1:61275-61282
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
 @ ./node_modules/yargs/index.cjs 5:29-57
 @ ./src/utils/CliUtils.ts 28:27-43
 @ ./src/lifecycle/ConfigurationManager.ts 19:19-47
 @ ./src/server.ts 44:44-87
 @ ./src/index.ts 32:28-47

WARNING in ./node_modules/yargs/index.cjs 12:39-46
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
 @ ./src/utils/CliUtils.ts 28:27-43
 @ ./src/lifecycle/ConfigurationManager.ts 19:19-47
 @ ./src/server.ts 44:44-87
 @ ./src/index.ts 32:28-47

WARNING in ./node_modules/yargs/node_modules/yargs-parser/build/index.cjs 1029:19-32
Critical dependency: the request of a dependency is an expression
 @ ./node_modules/yargs/build/index.cjs 1:60569-60592 1:61841-61864
 @ ./node_modules/yargs/index.cjs 5:29-57
 @ ./src/utils/CliUtils.ts 28:27-43
 @ ./src/lifecycle/ConfigurationManager.ts 19:19-47
 @ ./src/server.ts 44:44-87
 @ ./src/index.ts 32:28-47

8 warnings have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.95.0 compiled with 8 warnings in 2377 ms
Directory created successfully:  /home/kira/software/MATLAB-language-server/out/licensing/static

> [email protected] build
> react-scripts build

Creating an optimized production build...
Browserslist: browsers data (caniuse-lite) is 9 months old. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
Browserslist: browsers data (caniuse-lite) is 9 months old. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
Compiled successfully.

File sizes after gzip:

  64.36 kB  build/static/js/main.f970209d.js
  46.54 kB  build/static/css/main.0ab77c04.css

The project was built assuming it is hosted at ./.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.

Find out more about deployment here:

  https://cra.link/deployment

Files copied successfully.

> [email protected] package
> webpack --mode production --devtool hidden-source-map

assets by path utils/*.ts 10.7 KiB 11 assets
assets by path licensing/ 18.2 KiB 10 assets
assets by path providers/ 15.3 KiB 8 assets
assets by path indexing/*.ts 19.1 KiB 5 assets
assets by path lifecycle/*.ts 8.1 KiB 5 assets
assets by path debug/*.ts 6.02 KiB 3 assets
assets by path *.ts 851 bytes 3 assets
assets by path *.js 1.59 MiB 2 assets
assets by path logging/*.ts 2.03 KiB 2 assets
assets by path mvm/*.ts 1.16 KiB 2 assets
asset notifications/NotificationService.d.ts 2.54 KiB [compared for emit]
orphan modules 46 KiB [orphan] 21 modules
runtime modules 2.17 KiB 7 modules
modules by path ./node_modules/ 2.31 MiB
  javascript modules 2.05 MiB 329 modules
  json modules 263 KiB
    modules by path ./node_modules/iconv-lite/ 86.7 KiB 8 modules
    + 4 modules
modules by path ./src/ 910 KiB 52 modules
optional modules 168 bytes [optional]
  external "worker_threads" 42 bytes [optional] [built] [code generated]
  external "async_hooks" 42 bytes [optional] [built] [code generated]
  external "node:process" 42 bytes [optional] [built] [code generated]
  external "node:stream/web" 42 bytes [optional] [built] [code generated]
+ 25 modules

WARNING in ./node_modules/chokidar/lib/fsevents-handler.js 9:13-32
Module not found: Error: Can't resolve 'fsevents' in '/home/kira/software/MATLAB-language-server/node_modules/chokidar/lib'
 @ ./node_modules/chokidar/index.js 15:24-57
 @ ./src/lifecycle/MatlabSession.ts 46:30-49
 @ ./src/lifecycle/MatlabLifecycleManager.ts 38:24-50
 @ ./src/server.ts 45:49-94
 @ ./src/index.ts 32:28-47

WARNING in ./node_modules/express/lib/view.js 81:13-25
Critical dependency: the request of a dependency is an expression
 @ ./node_modules/express/lib/application.js 22:11-28
 @ ./node_modules/express/lib/express.js 18:12-36
 @ ./node_modules/express/index.js 11:0-41
 @ ./src/licensing/server/index.ts 17:34-52
 @ ./src/server.ts 66:17-46
 @ ./src/index.ts 32:28-47

WARNING in ./node_modules/yargs/build/index.cjs 1:437-463
Critical dependency: the request of a dependency is an expression
 @ ./node_modules/yargs/index.cjs 5:29-57
 @ ./src/utils/CliUtils.ts 28:27-43
 @ ./src/lifecycle/ConfigurationManager.ts 19:19-47
 @ ./src/server.ts 44:44-87
 @ ./src/index.ts 32:28-47

WARNING in ./node_modules/yargs/build/index.cjs 1:626-644
Critical dependency: the request of a dependency is an expression
 @ ./node_modules/yargs/index.cjs 5:29-57
 @ ./src/utils/CliUtils.ts 28:27-43
 @ ./src/lifecycle/ConfigurationManager.ts 19:19-47
 @ ./src/server.ts 44:44-87
 @ ./src/index.ts 32:28-47

WARNING in ./node_modules/yargs/build/index.cjs 1:60883-60890
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
 @ ./node_modules/yargs/index.cjs 5:29-57
 @ ./src/utils/CliUtils.ts 28:27-43
 @ ./src/lifecycle/ConfigurationManager.ts 19:19-47
 @ ./src/server.ts 44:44-87
 @ ./src/index.ts 32:28-47

WARNING in ./node_modules/yargs/build/index.cjs 1:61275-61282
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
 @ ./node_modules/yargs/index.cjs 5:29-57
 @ ./src/utils/CliUtils.ts 28:27-43
 @ ./src/lifecycle/ConfigurationManager.ts 19:19-47
 @ ./src/server.ts 44:44-87
 @ ./src/index.ts 32:28-47

WARNING in ./node_modules/yargs/index.cjs 12:39-46
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
 @ ./src/utils/CliUtils.ts 28:27-43
 @ ./src/lifecycle/ConfigurationManager.ts 19:19-47
 @ ./src/server.ts 44:44-87
 @ ./src/index.ts 32:28-47

WARNING in ./node_modules/yargs/node_modules/yargs-parser/build/index.cjs 1029:19-32
Critical dependency: the request of a dependency is an expression
 @ ./node_modules/yargs/build/index.cjs 1:60569-60592 1:61841-61864
 @ ./node_modules/yargs/index.cjs 5:29-57
 @ ./src/utils/CliUtils.ts 28:27-43
 @ ./src/lifecycle/ConfigurationManager.ts 19:19-47
 @ ./src/server.ts 44:44-87
 @ ./src/index.ts 32:28-47

8 warnings have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.95.0 compiled with 8 warnings in 7139 ms

To Reproduce
Steps to reproduce the behavior:

  1. Install the server:
git clone https://github.com/mathworks/MATLAB-language-server
cd MATLAB-language-server/
npm install && npm run compile && npm run package
  1. Clone this repo: git clone https://github.com/kurokirasama/matlab_lsp_sublime
  2. In sublime text install the LSP package.
  3. Open Preferences > Package Settings > LSP > Settings
  4. Add the content of the lsp-matlab.sublime-settings file to your clients (copy-paste if you have none).
  5. Modify paths accordingly.

MATLAB path should look like /usr/local/MATLAB/R2023a (in linux). Use matlabroot within MATLAB to get its value.

Expected behavior
The server should work.

Screenshots
If applicable, add screenshots to help explain your problem.

Useful Information

  • MATLAB Version: R2024b Update 5
  • OS Version: Ubuntu 24.04.2 LTS x86_64
  • Language Server Client: manually installed from this repo
  • Client Version: 1.3.3

Additional context
Sublime text config:

{
       "clients": {
           "matlab": {
               "command": [
                    "/usr/bin/node", 
                    "/home/kira/software/MATLAB-language-server/out/index.js",
                    "--stdio", 
                    "--matlabInstallPath", 
                    "/usr/local/MATLAB/R2024b"
                ],
               "enabled": true,
               "selector": "source.matlab",
               "settings": {
                    "MATLAB.indexWorkspace": true,
                    "MATLAB.installPath": "/usr/local/MATLAB/R2024b",
                    "MATLAB.matlabConnectionTiming": "onStart",
                    "MATLAB.telemetry": false
                }
           },
       },
       "log_debug": true
   }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions