Code Monkey home page Code Monkey logo

Comments (28)

darvids0n avatar darvids0n commented on May 19, 2024 4

I also have the same issue, but currently I can work around it by running npm install in the extension's folder:

cd ~/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/
npm install

Having same issue in MacOS:

Error: Cannot find module 'astrojs-compiler-sync'
Require stack:
- /Users/yaiko/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/server/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1082:15)
    at Module._load (node:internal/modules/cjs/loader:927:27)
    at f._load (node:electron/js2c/asar_bundle:2:13377)
    at Module.require (node:internal/modules/cjs/loader:1148:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at /Users/yaiko/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/server/index.js:4617:6454
    at /Users/yaiko/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/server/index.js:1:266
    at /Users/yaiko/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/server/index.js:5087:3691
    at /Users/yaiko/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/server/index.js:1:266
    at /Users/yaiko/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/server/index.js:5089:1813 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/yaiko/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/server/index.js'
  ]
}

Node.js v18.15.0
[Error - 8:26:10 PM] The vscode-graphql server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
Initialization failed
Pending response rejected since connection got disposed
Error: Pending response rejected since connection got disposed

from graphiql.

M1CK431 avatar M1CK431 commented on May 19, 2024 1

Extra info: I'm using Code OSS, again dunno if it may have any impact.

from graphiql.

M1CK431 avatar M1CK431 commented on May 19, 2024 1

Confirmed this workaround to works from my side too. I use npm i --omit=dev, trying to save a bit space 😉
@acao perhaps it gives you some insights to fix this issue? 🤞🏼

from graphiql.

hlshen avatar hlshen commented on May 19, 2024 1

98af530#diff-282a02f8ecaf263e63ceecdc0702ec641f159a3b9069ad12769816236f0f602e

I believe the "external" params is preventing astro from being installed.

from graphiql.

acao avatar acao commented on May 19, 2024 1

if you're still experiencing this bug in the latest release of the vscode extension or the CLI, let's do a poll - please react to this comment with:

  • 👍🏻 Open VSX
  • 👎🏻 VSCode Marketplace (I believe the issue is solved here, but just in case)
  • 👀 CLI user - npm/npx/nvim/sublime/etc

from graphiql.

M1CK431 avatar M1CK431 commented on May 19, 2024 1

Solved in #3547 🥳

from graphiql.

acao avatar acao commented on May 19, 2024 1

fantastic to hear, thanks for helping!

from graphiql.

M1CK431 avatar M1CK431 commented on May 19, 2024 1

I just add a 👍🏼 on the mentioned issue 😘

from graphiql.

acao avatar acao commented on May 19, 2024

@M1CK431 oh noo... i manually tested with vscode-graphql vsix and everything!

from graphiql.

M1CK431 avatar M1CK431 commented on May 19, 2024

I'm using Open VSX as extensions marketplace, don't know if it may have an impact or not 🤷🏼‍♂️
https://open-vsx.org/extension/GraphQL/vscode-graphql

Also, I try to uninstall / reinstall => same issue 😢

from graphiql.

acao avatar acao commented on May 19, 2024

huh, are you using it with astro files? i cannot reproduce it from the vscode marketplace. i will try again after work

it might be an issue that only effects the ovsx bundle and not the vsix bundle. sadly both can only be manually tested 🥺

from graphiql.

M1CK431 avatar M1CK431 commented on May 19, 2024

I haven't any astro file in my projet (in fact I even don't know what it is 🤭).
I just try to install it manually using the .vsix file downloaded from Open VSX => same error

Perhaps there is an extra check to do on astrojs-compiler-sync existence in the project dependencies? 🤷🏼‍♂️

from graphiql.

Dalichowski avatar Dalichowski commented on May 19, 2024

image
I have the same issue here 😓

from graphiql.

joeiw avatar joeiw commented on May 19, 2024

I'm also experiencing this error on v0.9.1

[Error - 11:48:13] vscode-graphql client: couldn't create connection to server.
Message: Pending response rejected since connection got disposed
Code: -32097
node:internal/modules/cjs/loader:966
throw err;
^

Error: Cannot find module 'astrojs-compiler-sync'
Require stack:

  • /home/joe/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/server/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:963:15)
    at Module._load (node:internal/modules/cjs/loader:811:27)
    at f._load (node:electron/js2c/asar_bundle:2:13330)
    at Module.require (node:internal/modules/cjs/loader:1035:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at /home/joe/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/server/index.js:4617:6454
    at /home/joe/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/server/index.js:1:266
    at /home/joe/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/server/index.js:5087:3691
    at /home/joe/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/server/index.js:1:266
    at /home/joe/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/server/index.js:5089:1813 {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/home/joe/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/server/index.js'
    ]
    }
    [Info - 11:48:13] Connection to server got closed. Server will restart.
    Initialization failed
    Pending response rejected since connection got disposed
    Error: Pending response rejected since connection got disposed
    at Object.dispose (/home/joe/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:29:4460)
    at Object.dispose (/home/joe/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:39:22314)
    at Ll.handleConnectionClosed (/home/joe/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:39:12275)
    at Ll.handleConnectionClosed (/home/joe/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:39:50478)
    at t (/home/joe/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:39:11956)
    at ia.invoke (/home/joe/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:2:14331)
    at n.fire (/home/joe/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:2:15100)
    at Lt (/home/joe/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:3:6456)
    at ia.invoke (/home/joe/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:2:14331)
    at n.fire (/home/joe/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:2:15100)
    at Pa.fireClose (/home/joe/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:2:17355)
    at ChildProcess. (/home/joe/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:29:13076)
    at ChildProcess.emit (node:events:525:35)
    at maybeClose (node:internal/child_process:1093:16)
    at Socket. (node:internal/child_process:451:11)
    at Socket.emit (node:events:513:28)
    at Pipe. (node:net:757:14)

from graphiql.

jeremie-stripe avatar jeremie-stripe commented on May 19, 2024

Having the same problem, from a cursory inspection it seems this only manifest in situation where the LSP server is ran with a plain nodejs runtime (v18.15.0) rather than the bundled Electron runtime. This happens as well when you are using the remote extensions (e.g. SSH). TL;DR I would bet the problem is that nodejs is trying to load code/modules differently from how Electron does it when running locally with the official distribution.

from graphiql.

acao avatar acao commented on May 19, 2024

Last week I upgraded ovsx cli and made a new release in the hopes that this would fix the vsix build for ovsx users. For vsce vsix builds it works fine.

Regarding running the LSP outside of an IDE client build - It is marked as a dependency of the graphql-language-service-server, and the LSP tests are passing for node 18, so make sure your environments have been updated for this new dependency.

from graphiql.

M1CK431 avatar M1CK431 commented on May 19, 2024

@acao are you speaking about v0.9.1? If yes, I already try it and experiencing the same issue. Also, if my node version could be important, I'm currently using v21.6.1. Should I try with another version?

from graphiql.

ElYaiko avatar ElYaiko commented on May 19, 2024

Having same issue in MacOS:

Error: Cannot find module 'astrojs-compiler-sync'
Require stack:
- /Users/yaiko/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/server/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1082:15)
    at Module._load (node:internal/modules/cjs/loader:927:27)
    at f._load (node:electron/js2c/asar_bundle:2:13377)
    at Module.require (node:internal/modules/cjs/loader:1148:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at /Users/yaiko/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/server/index.js:4617:6454
    at /Users/yaiko/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/server/index.js:1:266
    at /Users/yaiko/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/server/index.js:5087:3691
    at /Users/yaiko/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/server/index.js:1:266
    at /Users/yaiko/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/server/index.js:5089:1813 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/yaiko/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/server/index.js'
  ]
}

Node.js v18.15.0
[Error - 8:26:10 PM] The vscode-graphql server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
Initialization failed
Pending response rejected since connection got disposed
Error: Pending response rejected since connection got disposed

from graphiql.

ArmandPhilippot avatar ArmandPhilippot commented on May 19, 2024

Same issue here with Code OSS on Manjaro with v0.9.1:

Version: 1.85.1
Commit: Unknown
Date: 2023-12-14T20:02:29.406Z
Electron: 25.9.8
ElectronBuildId: undefined
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Linux x64 6.6.10-1-MANJARO

I'm using Astro but without GraphQL. However I have both extensions enabled globally.

The strange thing is that the output of the Developer Tools (Help -> Toggle Developer Tools) is not exactly the same as the one in Output (which is the same as those already posted). In the Developer tools I don't see any mention of astrojs-compiler-sync. Here the details:

vscode-graphql client: couldn't create connection to server.
c	@	workbench.desktop.main.js:769

Then:

[GraphQL.vscode-graphql]Pending response rejected since connection got disposed
$onExtensionRuntimeError	@	workbench.desktop.main.js:2017

Then:

Error: Pending response rejected since connection got disposed
at Object.dispose (/home/armand/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:29:4460)
	at Object.dispose (/home/armand/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:39:22314)
	at Ll.handleConnectionClosed (/home/armand/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:39:12275)
	at Ll.handleConnectionClosed (/home/armand/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:39:50478)
	at t (/home/armand/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:39:11956)
	at ia.invoke (/home/armand/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:2:14331)
	at n.fire (/home/armand/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:2:15100)
	at Lt (/home/armand/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:3:6456)
	at ia.invoke (/home/armand/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:2:14331)
	at n.fire (/home/armand/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:2:15100)
	at Pa.fireClose (/home/armand/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:2:17355)
	at ChildProcess.<anonymous> (/home/armand/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:29:13076)
	at ChildProcess.emit (node:events:525:35)
	at ChildProcess.emit (node:domain:489:12)
	at maybeClose (node:internal/child_process:1091:16)
	at ChildProcess._handle.onexit (node:internal/child_process:302:5)

Then:

[GraphQL.vscode-graphql]Client is not running and can't be stopped. It's current state is: starting
$onExtensionRuntimeError	@	workbench.desktop.main.js:2017

Then:

Error: Client is not running and can't be stopped. It's current state is: starting
at Ll.shutdown (/home/armand/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:39:8615)
	at Ll.stop (/home/armand/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:39:8194)
	at Ll.stop (/home/armand/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:39:50088)
	at Ll.doInitialize (/home/armand/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:39:7732)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async Ll.start (/home/armand/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:39:4599)
	at async xR (/home/armand/.vscode-oss/extensions/graphql.vscode-graphql-0.9.1-universal/out/extension.js:39:61849)
	at async u.n (/usr/lib/code/out/vs/workbench/api/node/extensionHostProcess.js:140:6255)
	at async u.m (/usr/lib/code/out/vs/workbench/api/node/extensionHostProcess.js:140:6218)
	at async u.l (/usr/lib/code/out/vs/workbench/api/node/extensionHostProcess.js:140:5675)

Then the errors repeat themselves since the server cannot be restarted and finally I get:

The vscode-graphql server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
c	@	workbench.desktop.main.js:769

from graphiql.

acao avatar acao commented on May 19, 2024

unfortunately, if we remove it from external then it doesn't seem to work for vsce or for vscode marketplace 😢
perhaps we can make seperate esbuilds for vsce and ovsx then... !

from graphiql.

Csszabi98 avatar Csszabi98 commented on May 19, 2024

@M1CK431 Looks like the fixed version was not published to open vsx, there the latest version is still 0.9.2.
https://open-vsx.org/extension/GraphQL/vscode-graphql

from graphiql.

M1CK431 avatar M1CK431 commented on May 19, 2024

@Csszabi98 That's true but your man is @acao , not me 😉
In the meantime, you can downlad/install it from here: https://marketplace.visualstudio.com/items?itemName=GraphQL.vscode-graphql

from graphiql.

acao avatar acao commented on May 19, 2024

@Csszabi98 I think there is an issue with openvsx publishing again and I will check to restore this before the next release!

from graphiql.

acao avatar acao commented on May 19, 2024

i will keep this open until we can confirm there is a working release for Open VSX users

i also released a prerelease of 0.10 to openvsx manually, as i did for vscode marketplace. did those show up? huge improvements coming across the board!

from graphiql.

acao avatar acao commented on May 19, 2024

ok, so, i learned the hard way that the bundled extension approach for open vsx publishing that appears to fix this issue also does not support pre-release. due to this and another issue I have accidentally published 0.10.1 pre-release as 0.10.1 stable on open-vsx 😆. an accidental bonus, you'll be seeing a fix for this issue as well as many other bugfixes, i apologize if there are any bugs from this refactor that you see before marketplace users do, but we can get this all cleaned up in a few patch releases to both extensions.

unfortunately vsix extensions do not support full semver for pre-releases, so it's tricky to get them working with our release tooling, as it could cause many undesired version increments if we're not careful

from graphiql.

acao avatar acao commented on May 19, 2024

ok so, the bad news is that 0.10.1 turned out to be a not-good release for schema first users on manual testing because of some assumptions by the integration test suites that didn't pan out. i can't find a way to roll back on openvsx either. i will find a way to rectify this, but i hope to ideally have an 0.9.4 release if I can or an 0.10.2 release to fix this, without the rewrite that currently needs some more tweaking

from graphiql.

acao avatar acao commented on May 19, 2024

I have asked the eclipse foundation to delete the impacted versions from the registry until we can correct this! Emoji reacts might help boost it :)

EclipseFdn/open-vsx.org#2428

if they aren't able to get back to me by monday, i will just jump the 0.10.x release for 0.11, and make 0.10.2 the fix for all open-vsx users with a matching repeat release for the marketplace just so we're back in sync

from graphiql.

acao avatar acao commented on May 19, 2024

ok! those versions are deleted. partially resolved. I will try to get you a 0.9.4 release to fix tomorrow, and we will keep trying til it does. probably high time i install vscodium and confirm it works myself 😂 0.9.x just fixes svelte and adds astro parsing, but i want to close this ticket once we have a release working on open vsx. 0.10.0 will be a major improvement but I need til next week to do more thorough manual testing

from graphiql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.