You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Cannot find module 'vscode-languageserver'
at Module.r.require.e [as require] (/app/code-server:468:26234)
at Object.i.__awaiter.n (~/.code-server/extensions/bmewburn.vscode-intelephense-client-1.0.8/node_modules/intelephense/lib/intelephense.js:39:155362)
at n (~/.code-server/extensions/bmewburn.vscode-intelephense-client-1.0.8/node_modules/intelephense/lib/intelephense.js:39:113)
at Object.<anonymous> (~/.code-server/extensions/bmewburn.vscode-intelephense-client-1.0.8/node_modules/intelephense/lib/intelephense.js:39:147092)
at n (~/.code-server/extensions/bmewburn.vscode-intelephense-client-1.0.8/node_modules/intelephense/lib/intelephense.js:39:113)
at Object.i.__awaiter.n (~/.code-server/extensions/bmewburn.vscode-intelephense-client-1.0.8/node_modules/intelephense/lib/intelephense.js:39:146712)
[Error - 18:00:17] Connection to server got closed. Server will not be restarted.
Maybe related: I'm also having the same issue with vetur: https://github.com/vuejs/vetur The extension colors the code but intellisense and auto formatting isn't working.
@foresthoffman
I first installed the extension on Saturday and then uninstalled it directly because it didn't work.
I reinstalled the extension just before opening this issue.
@HeavyHorst Please try uninstalling again, but this time also manually remove the ~/.code-server/extensions/bmewburn.vscode-intelephense-client-1.0.8 directory. Then, reinstalling should perform a proper redownload.
I deleted the complete .code-server folder and restarted the server.
I'm still getting this error message:
Error: Cannot find module 'vscode-languageserver'
at Module.r.require.e [as require] (/app/code-server:468:26234)
at Object.i.__awaiter.n (~/.code-server/extensions/bmewburn.vscode-intelephense-client-1.0.8/node_modules/intelephense/lib/intelephense.js:39:155362)
at n (~/.code-server/extensions/bmewburn.vscode-intelephense-client-1.0.8/node_modules/intelephense/lib/intelephense.js:39:113)
at Object.<anonymous> (~/.code-server/extensions/bmewburn.vscode-intelephense-client-1.0.8/node_modules/intelephense/lib/intelephense.js:39:147092)
at n (~/.code-server/extensions/bmewburn.vscode-intelephense-client-1.0.8/node_modules/intelephense/lib/intelephense.js:39:113)
at Object.i.__awaiter.n (~/.code-server/extensions/bmewburn.vscode-intelephense-client-1.0.8/node_modules/intelephense/lib/intelephense.js:39:146712)
[Error - 19:48:24] Connection to server got closed. Server will not be restarted.
I get the same problem with intelephense. For me though felixfbecker.php-intellisense is working perfectly, so I'm taking a stab that it probably has something to do with where their language server packages are required from.
Intelephense is trying to get them from the node_modules folder where as intellisense is getting them successfully from the composer vendor folder.
Ok now I'm pretty much 95% positive it is the paths that is the issue here. If you go in to the file requiring whatever, for example I was using shinn.stylelint to debug because the code isn't minified.
Then if you change that to an absolute path from your filesystem root, it will find that module and error our on the next relative path require it hits, I went on fixing 4 or 5 levels up of this til I was convinced this is the issue.
Hmm, that's very weird. I appreciate the feedback! intelephense should be working, as it's requiring vscode-languageserver and vscode-languageserver is sitting in node_modules, right next to the source. It just doesn't work for some reason.
@HeavyHorst does felixfbecker.php-intellisense work for you?
You can see if you look at the extension output inside vscode from any extension trying to require the language server packages from node_modules they all 100% come back as invalid module not found with the relative path. I have 3 extensions all failing because of the same relative path issue, and the only one not using them from inside node_modules is working fine.
Is it possible you have some webpack resolve setting somewhere which is setting the resolvable paths to vscode-languageserver packages to somewhere specific not including where extensions would be loading from?
cb2232.bundle.js:45 [Extension Host] Here is the error stack: Error: Cannot find module '/./node_modules.asar/vscode-textmate'
Looks like when extensions (probably the built in terminal as well), try and resolve modules from node_modules folder webpack wants to resolve their path as an absolute path always.
Maybe I'm mistaken but is this a string replace loader on the filepath with a regex on as .js and .ts files?
Right below is one for all node module files using the node-loader library.
Something of interest possibly right in here https://github.com/codercom/code-server/blob/master/packages/ide/src/fill/path.js#L305 exporting all those function into the global scope.
I know you all will be happy to track this down and close it because no joke the same root issue here probably accounts for ~half your open issues in one way or another.
I was about to make an issue regarding Bracket Pair Colorizer 2 not working as well but after reading the thread and your last post it makes sense that the problem is bigger than just that, and finding the root cause is the way to go. As far as I know, a lot of extensions are being affected by this including Eslint, Bracket Pair, Intelephense and a few others.
It appears that the version of CoenraadS.bracket-pair-colorizer-2 that we're currently hosting on our marketplace is outdated. The reason being, the extension cannot be packaged due to a faulty dependency. The extension requires the event-stream@3.3.6 package which was responsible for a major security hole, so it was removed from npm. Although the package.json has been updated to exclude this package, the lock file still refers to it here. This renders the extension unpackageable.
Currently looking into the issue with '/./node_modules.asar/vscode-textmate'.
@HeavyHorst@RiFi2kbmewburn.vscode-intelephense-client-1.0.8 should be good now, on our newest release. PR #284 should fix the CoenraadS.bracket-pair-colorizer-2 extension's error regarding vscode-textmate.
Activity
sebastianmacias commentedon Mar 11, 2019
Maybe related: I'm also having the same issue with vetur: https://github.com/vuejs/vetur The extension colors the code but intellisense and auto formatting isn't working.
foresthoffman commentedon Mar 11, 2019
@HeavyHorst When did you first install the extension?
HeavyHorst commentedon Mar 11, 2019
@foresthoffman
I first installed the extension on Saturday and then uninstalled it directly because it didn't work.
I reinstalled the extension just before opening this issue.
foresthoffman commentedon Mar 11, 2019
@HeavyHorst Please try uninstalling again, but this time also manually remove the
~/.code-server/extensions/bmewburn.vscode-intelephense-client-1.0.8directory. Then, reinstalling should perform a proper redownload.HeavyHorst commentedon Mar 11, 2019
I deleted the complete .code-server folder and restarted the server.
I'm still getting this error message:
RiFi2k commentedon Mar 13, 2019
I get the same problem with intelephense. For me though felixfbecker.php-intellisense is working perfectly, so I'm taking a stab that it probably has something to do with where their language server packages are required from.
Intelephense is trying to get them from the node_modules folder where as intellisense is getting them successfully from the composer vendor folder.
RiFi2k commentedon Mar 13, 2019
Ok now I'm pretty much 95% positive it is the paths that is the issue here. If you go in to the file requiring whatever, for example I was using shinn.stylelint to debug because the code isn't minified.
Originally the error comes from
Then if you change that to an absolute path from your filesystem root, it will find that module and error our on the next relative path require it hits, I went on fixing 4 or 5 levels up of this til I was convinced this is the issue.
Hope it help, great project btw!
foresthoffman commentedon Mar 13, 2019
Hmm, that's very weird. I appreciate the feedback! intelephense should be working, as it's requiring
vscode-languageserverandvscode-languageserveris sitting in node_modules, right next to the source. It just doesn't work for some reason.@HeavyHorst does felixfbecker.php-intellisense work for you?
RiFi2k commentedon Mar 13, 2019
You can see if you look at the extension output inside vscode from any extension trying to require the language server packages from node_modules they all 100% come back as invalid module not found with the relative path. I have 3 extensions all failing because of the same relative path issue, and the only one not using them from inside node_modules is working fine.
Is it possible you have some webpack resolve setting somewhere which is setting the resolvable paths to vscode-languageserver packages to somewhere specific not including where extensions would be loading from?
RiFi2k commentedon Mar 15, 2019
Getting super close on this now, if I had to wager I would say this is the problem, likely with alot of stuff.
Looks like when extensions (probably the built in terminal as well), try and resolve modules from node_modules folder webpack wants to resolve their path as an absolute path always.
Maybe I'm mistaken but is this a string replace loader on the filepath with a regex on as .js and .ts files?
Right below is one for all node module files using the node-loader library.
Something of interest possibly right in here
https://github.com/codercom/code-server/blob/master/packages/ide/src/fill/path.js#L305exporting all those function into the global scope.I know you all will be happy to track this down and close it because no joke the same root issue here probably accounts for ~half your open issues in one way or another.
Pitu commentedon Mar 15, 2019
I was about to make an issue regarding Bracket Pair Colorizer 2 not working as well but after reading the thread and your last post it makes sense that the problem is bigger than just that, and finding the root cause is the way to go. As far as I know, a lot of extensions are being affected by this including Eslint, Bracket Pair, Intelephense and a few others.
foresthoffman commentedon Mar 18, 2019
It appears that the version of
CoenraadS.bracket-pair-colorizer-2that we're currently hosting on our marketplace is outdated. The reason being, the extension cannot be packaged due to a faulty dependency. The extension requires theevent-stream@3.3.6package which was responsible for a major security hole, so it was removed from npm. Although the package.json has been updated to exclude this package, the lock file still refers to it here. This renders the extension unpackageable.Currently looking into the issue with
'/./node_modules.asar/vscode-textmate'.RiFi2k commentedon Mar 20, 2019
I actually used the current version from my regular VSCodium install. Copied to the code-server install.
foresthoffman commentedon Mar 20, 2019
@HeavyHorst @RiFi2k
bmewburn.vscode-intelephense-client-1.0.8should be good now, on our newest release. PR #284 should fix theCoenraadS.bracket-pair-colorizer-2extension's error regardingvscode-textmate.RiFi2k commentedon Mar 20, 2019
@foresthoffman My man, nicely done
HeavyHorst commentedon Mar 22, 2019
Works like a charm. Thanks!
NickBolles commentedon Jun 26, 2019
@sebastianmacias did you ever get your issue with vetur figured out?
deansheather commentedon Jun 27, 2019
@NickBolles if you're still having an issue with Vetur, you're better off opening a new issue with the "broken extension" template.