bmatcuk/coc-stylelintplus

Server crashes with MODULE_NOT_FOUND

zakthompson opened this issue · 11 comments

Hi there!

I'm trying to use this extension, but each time I open a CSS file it tells me the server crashed 5 times and won't be restarted. I turned on tracing and checked the output and it seems to throw a MODULE_NOT_FOUND error on tslib.

Any help you could provide would be greatly appreciated!

Hmm, can you try running :CocInfo in nvim and paste the output here? Specifically the stuff under ## versions at the top, and the ## output channel: stylelintplus section if it exists.

Thanks for the response! Here is the output of :CocInfo

Screen Shot 2020-11-28 at 2 06 41 PM

And here, for your reference, is the server trace error:

Screen Shot 2020-11-28 at 2 07 41 PM

And the full trace params in txt form, if it's useful:

trace.txt

Any updates on this? I have the same problem, here's the output from my :CocInfo:

## versions

vim version: VIM - Vi IMproved 8.2 8022100
node version: v14.15.1
coc.nvim version: 0.0.79-721f227aa0
coc.nvim directory: /Users/rol/.vim/bundle/coc.nvim
term: iTerm.app
platform: darwin

## Log of coc.nvim

2020-12-11T12:52:58.575 INFO (pid:67548) [extensions] - Skipped load vim plugin from "/Users/rol/.config/coc/extensions/node_modules/coc-explorer", "coc-explorer" already global extension.
2020-12-11T12:52:58.578 INFO (pid:67548) [extensions] - Skipped load vim plugin from "/Users/rol/.config/coc/extensions/node_modules/coc-snippets", "coc-snippets" already global extension.
2020-12-11T12:52:58.697 INFO (pid:67548) [services] - registered service "css"
2020-12-11T12:52:58.698 INFO (pid:67548) [services] - Css language server state change: stopped => starting
2020-12-11T12:52:58.737 INFO (pid:67548) [services] - registered service "eslint"
2020-12-11T12:52:58.737 INFO (pid:67548) [services] - eslint langserver state change: stopped => starting
2020-12-11T12:52:59.227 INFO (pid:67548) [language-client-index] - css started with 67575
2020-12-11T12:52:59.235 INFO (pid:67548) [language-client-index] - eslint started with 67576
2020-12-11T12:52:59.364 INFO (pid:67548) [services] - eslint langserver state change: starting => running
2020-12-11T12:52:59.373 INFO (pid:67548) [services] - service eslint started
2020-12-11T12:52:59.378 INFO (pid:67548) [watchman] - watchman watching project: /Users/rol/projects/project5
2020-12-11T12:52:59.382 INFO (pid:67548) [services] - Css language server state change: starting => running
2020-12-11T12:52:59.385 INFO (pid:67548) [services] - service css started
2020-12-11T12:52:59.463 INFO (pid:67548) [services] - registered service "stylelintplus"
2020-12-11T12:52:59.463 INFO (pid:67548) [services] - stylelint language server state change: stopped => starting
2020-12-11T12:52:59.551 INFO (pid:67548) [services] - registered service "vetur"
2020-12-11T12:52:59.551 INFO (pid:67548) [services] - Vetur Language Server state change: stopped => starting
2020-12-11T12:52:59.569 INFO (pid:67548) [language-client-index] - stylelintplus started with 67604
2020-12-11T12:52:59.573 INFO (pid:67548) [language-client-index] - vetur started with 67605
2020-12-11T12:52:59.579 INFO (pid:67548) [plugin] - coc.nvim 0.0.79-721f227aa0 initialized with node: v14.15.1 after 1064ms
2020-12-11T12:52:59.613 INFO (pid:67548) [services] - registered service "tsserver"
2020-12-11T12:52:59.633 INFO (pid:67548) [services] - stylelint language server state change: starting => stopped
2020-12-11T12:52:59.633 INFO (pid:67548) [services] - stylelint language server state change: stopped => starting
2020-12-11T12:52:59.636 INFO (pid:67548) [language-client-index] - stylelintplus started with 67606
2020-12-11T12:52:59.700 INFO (pid:67548) [services] - stylelint language server state change: starting => stopped
2020-12-11T12:52:59.701 INFO (pid:67548) [services] - stylelint language server state change: stopped => starting
2020-12-11T12:52:59.703 INFO (pid:67548) [language-client-index] - stylelintplus started with 67607
2020-12-11T12:52:59.765 INFO (pid:67548) [services] - stylelint language server state change: starting => stopped
2020-12-11T12:52:59.765 INFO (pid:67548) [services] - stylelint language server state change: stopped => starting
2020-12-11T12:52:59.770 INFO (pid:67548) [language-client-index] - stylelintplus started with 67613
2020-12-11T12:52:59.874 INFO (pid:67548) [services] - stylelint language server state change: starting => stopped
2020-12-11T12:52:59.874 INFO (pid:67548) [services] - stylelint language server state change: stopped => starting
2020-12-11T12:52:59.884 INFO (pid:67548) [language-client-index] - stylelintplus started with 67623
2020-12-11T12:52:59.980 INFO (pid:67548) [services] - stylelint language server state change: starting => stopped
2020-12-11T12:53:02.115 INFO (pid:67548) [services] - Vetur Language Server state change: starting => running
2020-12-11T12:53:02.116 INFO (pid:67548) [services] - service vetur started

Same here. 🤷‍♂️

## versions

vim version: NVIM v0.4.4
node version: v14.15.1
coc.nvim version: 0.0.79-365c63e12f
coc.nvim directory: /home/dan/.dotfiles/config/nvim/bundle/coc.nvim
term: xterm-256color
platform: linux

## Log of coc.nvim

2020-12-16T13:04:59.032 INFO (pid:305879) [services] - registered service "eslint"
2020-12-16T13:04:59.284 INFO (pid:305879) [services] - registered service "stylelintplus"
2020-12-16T13:04:59.306 INFO (pid:305879) [plugin] - coc.nvim 0.0.79-365c63e12f initialized with node: v14.15.1 after 369ms
2020-12-16T13:05:01.090 INFO (pid:305879) [services] - eslint langserver state change: stopped => starting
2020-12-16T13:05:01.091 INFO (pid:305879) [services] - stylelint language server state change: stopped => starting
2020-12-16T13:05:01.146 INFO (pid:305879) [language-client-index] - eslint started with 305904
2020-12-16T13:05:01.161 INFO (pid:305879) [language-client-index] - stylelintplus started with 305912
2020-12-16T13:05:01.201 INFO (pid:305879) [services] - registered service "tsserver"
2020-12-16T13:05:01.217 INFO (pid:305879) [services] - stylelint language server state change: starting => stopped
2020-12-16T13:05:01.217 INFO (pid:305879) [services] - stylelint language server state change: stopped => starting
2020-12-16T13:05:01.225 INFO (pid:305879) [language-client-index] - stylelintplus started with 305919
2020-12-16T13:05:01.227 INFO (pid:305879) [services] - eslint langserver state change: starting => running
2020-12-16T13:05:01.230 INFO (pid:305879) [services] - service eslint started
2020-12-16T13:05:01.267 INFO (pid:305879) [services] - stylelint language server state change: starting => stopped
2020-12-16T13:05:01.267 INFO (pid:305879) [services] - stylelint language server state change: stopped => starting
2020-12-16T13:05:01.275 INFO (pid:305879) [language-client-index] - stylelintplus started with 305933
2020-12-16T13:05:01.323 INFO (pid:305879) [services] - stylelint language server state change: starting => stopped
2020-12-16T13:05:01.323 INFO (pid:305879) [services] - stylelint language server state change: stopped => starting
2020-12-16T13:05:01.327 INFO (pid:305879) [language-client-index] - stylelintplus started with 305940
2020-12-16T13:05:01.390 INFO (pid:305879) [services] - stylelint language server state change: starting => stopped
2020-12-16T13:05:01.390 INFO (pid:305879) [services] - stylelint language server state change: stopped => starting
2020-12-16T13:05:01.395 INFO (pid:305879) [language-client-index] - stylelintplus started with 305947
2020-12-16T13:05:01.443 INFO (pid:305879) [services] - stylelint language server state change: starting => stopped

Same is happening on my machine also here is the output of CocInfo:

## versions

vim version: NVIM v0.5.0-828-g0a95549d6
node version: v14.14.0
coc.nvim version: 0.0.79
coc.nvim directory: /home/nexus/dotfiles/neovim/.config/nvim/plugged/coc.nvim
term: xterm-256color
platform: linux

Could the problem be form different versions of the installed in project Stylelint (13.8.0) and version used in stylelint-lsp(~13.6.1)

macig commented

Go to coc-stylelintplus folder and install tslib
For example: cd ~/.config/coc/extensions/node_modules/coc-stylelintplus then install tslib npm i -D tslib

@macig This actually solve the problem for me at least

Go to coc-stylelintplus folder and install tslib
For example: cd ~/.config/coc/extensions/node_modules/coc-stylelintplus then install tslib npm i -D tslib

Yes, this solves it. Can someone please submit a PR with this dependency?

macig commented

Yes, this solves it. Can someone please submit a PR with this dependency?

Yep

Ah, #15. Didn't notice, thanks.

Sorry for the delay everyone! Thanks for finding the solution, @macig. I've merged your PR and cut a new release. Let me know if you run into any issues with the new release!