Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection to server got closed. Server will restart. #279

Closed
valentinpalkovic opened this issue Jun 24, 2020 · 10 comments · Fixed by #284
Closed

Connection to server got closed. Server will restart. #279

valentinpalkovic opened this issue Jun 24, 2020 · 10 comments · Fixed by #284
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug.
Milestone

Comments

@valentinpalkovic
Copy link

valentinpalkovic commented Jun 24, 2020

Environment: Windows 10 Pro Build 19645.mn_release.200605-1502 with and without WSL 1
Plugin Version: Prisma 2.1.1
VSCode Version: 1.46.1

Error occurs while visiting schema.prisma file.

Error log:

internal/modules/cjs/loader.js:626
    throw err;
    ^

Error: Cannot find module '/home/valentin/.vscode-server/packages/language-server/bin/server.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:623:15)
    at Function.Module._load (internal/modules/cjs/loader.js:527:27)
    at Function.Module.runMain (internal/modules/cjs/loader.js:837:10)
    at internal/main/run_main_module.js:17:11 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
[Info  - 6:51:22 PM] Connection to server got closed. Server will restart.

It seems like the extension is searching in the wrong folder for the language-server. I also tried the latest Prisma Insider vscode plugin without any success

@janpio janpio added bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. kind/bug A reported bug. labels Jun 24, 2020
@pbelbin
Copy link

pbelbin commented Jun 24, 2020

Yeah, I am using macOS, and I see the same thing happening here with 2.1.1 of the Prisma plugin.

I would also note that in the informational page, about the plugin, where it has a link regarding 'Contributing', that the link is dead. It would sure be nice if that was fixed too.

ie:

Read more about how to contribute to the Prisma VSCode extension

@pbelbin
Copy link

pbelbin commented Jun 24, 2020

@janpio, you seem to indicate that this bug needs more information, but, you don't mention what the additional information you need is.

So, please mention what you need that has not been provided?

@janpio
Copy link
Member

janpio commented Jun 24, 2020

No additional information required from you, otherwise I would have asked for it. Someone will look into this and figure out if all information is available and if the problem can be reproduced.

@adriancbo
Copy link

adriancbo commented Jun 24, 2020

Experiencing this as well. packages directory does not exist but extensions does.

Environment: MacOS Catalina 10.15.5 - 2.9 GHz Quad-Core Intel Core i7 - 16 GB 2133 MHz LPDDR3
Plugin Version: 2.2.1
VSCode:
Version: 1.46.1
Commit: cd9ea6488829f560dc949a8b2fb789f3cdc05f5d
Date: 2020-06-17T21:17:14.222Z
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.5.0

Prisma Language Server output:

internal/modules/cjs/loader.js:720
    throw err;
    ^

Error: Cannot find module '/Users/acix/.vscode/packages/language-server/bin/server.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:717:15)
    at Module._load (internal/modules/cjs/loader.js:622:27)
    at Module._load (electron/js2c/asar.js:717:26)
    at Function.Module._load (electron/js2c/asar.js:717:26)
    at Function.Module.runMain (internal/modules/cjs/loader.js:944:10)
    at internal/main/run_main_module.js:17:11 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
[Info  - 5:42:39 PM] Connection to server got closed. Server will restart.
internal/modules/cjs/loader.js:720
    throw err;
    ^

Error: Cannot find module '/Users/acix/.vscode/packages/language-server/bin/server.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:717:15)
    at Module._load (internal/modules/cjs/loader.js:622:27)
    at Module._load (electron/js2c/asar.js:717:26)
    at Function.Module._load (electron/js2c/asar.js:717:26)
    at Function.Module.runMain (internal/modules/cjs/loader.js:944:10)
    at internal/main/run_main_module.js:17:11 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
[Info  - 5:42:39 PM] Connection to server got closed. Server will restart.
internal/modules/cjs/loader.js:720
    throw err;
    ^

Error: Cannot find module '/Users/acix/.vscode/packages/language-server/bin/server.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:717:15)
    at Module._load (internal/modules/cjs/loader.js:622:27)
    at Module._load (electron/js2c/asar.js:717:26)
    at Function.Module._load (electron/js2c/asar.js:717:26)
    at Function.Module.runMain (internal/modules/cjs/loader.js:944:10)
    at internal/main/run_main_module.js:17:11 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
[Info  - 5:42:39 PM] Connection to server got closed. Server will restart.
internal/modules/cjs/loader.js:720
    throw err;
    ^

Error: Cannot find module '/Users/acix/.vscode/packages/language-server/bin/server.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:717:15)
    at Module._load (internal/modules/cjs/loader.js:622:27)
    at Module._load (electron/js2c/asar.js:717:26)
    at Function.Module._load (electron/js2c/asar.js:717:26)
    at Function.Module.runMain (internal/modules/cjs/loader.js:944:10)
    at internal/main/run_main_module.js:17:11 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
[Info  - 5:42:39 PM] Connection to server got closed. Server will restart.
internal/modules/cjs/loader.js:720
    throw err;
    ^

Error: Cannot find module '/Users/acix/.vscode/packages/language-server/bin/server.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:717:15)
    at Module._load (internal/modules/cjs/loader.js:622:27)
    at Module._load (electron/js2c/asar.js:717:26)
    at Function.Module._load (electron/js2c/asar.js:717:26)
    at Function.Module.runMain (internal/modules/cjs/loader.js:944:10)
    at internal/main/run_main_module.js:17:11 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
[Error - 5:42:39 PM] Connection to server got closed. Server will not be restarted.

@pbelbin
Copy link

pbelbin commented Jun 24, 2020

While looking at how to download the previous version of this extension, I note that the 2.1.1 VSIXPackage, when downloaded, is only around 481KB in size. By comparison, the 2.1.0 downloadable is around 25.5MB.

@hi019
Copy link

hi019 commented Jun 25, 2020

Getting this as well.

Version: 1.46.1
Commit: cd9ea6488829f560dc949a8b2fb789f3cdc05f5d
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64

@ordidxzero
Copy link

I have the same problem.

Version: 1.46.1
Commit: cd9ea6488829f560dc949a8b2fb789f3cdc05f5d
Date: 2020-06-17T21:17:14.222Z
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.2.0

@carmenberndt carmenberndt self-assigned this Jun 25, 2020
@carmenberndt carmenberndt added the bug/2-confirmed Bug has been reproduced and confirmed. label Jun 25, 2020
@carmenberndt carmenberndt added this to the 2.2.0 milestone Jun 25, 2020
@janpio janpio removed the bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. label Jun 25, 2020
@ayyazzafar
Copy link

I am also facing same issue

@janpio
Copy link
Member

janpio commented Jun 25, 2020

We are aware and working on a fix right now. @carmenberndt will update here when the release is out.

@carmenberndt
Copy link
Contributor

carmenberndt commented Jun 25, 2020

We released 2.1.4 that fixed this issue.

What happened: We recently restructured this repo to separate the VSCode extension and the language server. The extension was not using the language server npm dependency but instead searched in the corresponding folder in the repo.

We now are only accessing the language server through the npm dependency.

To ensure that this doesn't happen again, we created the following issue:

Please try out 2.1.4 and let us know if there are any issue with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants