Closed andrewtimberlake closed 8 months ago
Glint is only compatible with ember-template-imports v3, until this is released:
What version of these deps do you have?
Thanks
It was: ember-template-imports 4.0.0 @glint/core 1.2.1
It seems this has removed the error: ember-template-imports 3.4.2 @glint/core 1.1.0 (1.2.0 didn’t work)
Which dep change resolved the error?
Can you try upgrading glint, using ember-template-imports v3?
According to stack trace issue related to https://marketplace.visualstudio.com/items?itemName=jkiviluoto.tws (/extensions/jkiviluoto.tws-1.0.1
), not glint
Which dep change resolved the error?
Can you try upgrading glint, using ember-template-imports v3?
If I upgrade to Glint 1.2.0, I get the following in the output:
file:///Users/andrew/dev/bbff/editor/node_modules/@glint/core/lib/language-server/util/index.js:3
import VSCodeURI from 'vscode-uri';
^^^^^^^^^
SyntaxError: The requested module 'vscode-uri' does not provide an export named 'default'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)
Node.js v18.15.0
[Info - 10:58:36] Connection to server got closed. Server will restart.
[Error - 10:58:36] Server initialization failed.
Message: Pending response rejected since connection got disposed
Code: -32097
[Error - 10:58:36] Glint client: couldn't create connection to server.
Message: Pending response rejected since connection got disposed
Code: -32097
If I upgrade to @glint/core 1.2.1 then I return to the original error “Unable to start Glint language server…”
I installed a new project with just ember-template-imports (3.4.2) and glint (1.2.1) and it worked. I then found a difference in my tsconfig.json file and changed that, now my current project has Glint working at 1.2.1 with ember-template-imports at 3.4.2 Thanks!
What did you change in your tsconfig.json that made things work?
Here’s the diff
There are a few things going on there
Thanks for pursuing this. I just wanted to get it to work, so the moment I got something without errors, I stopped. I have now isolated it to multiple extends. The moment I change tsconfig.json to:
{
"extends": ["@tsconfig/ember/tsconfig.json"],
I get the “Unable to start Glint language server…” error.
The diff now looks like this:
Legit, thanks!, can you open a separate issue for supporting multiple extends?
Does TS itself support multiple extends
? I don't see that documented https://www.typescriptlang.org/tsconfig#extends
It may not. I don’t remember how I got to that in my original config. I don’t think I need it so I’ll leave this here.
Does TS itself support multiple extends
it does, it's the whole reason the @tsconfig
/bases repo has migrated to the setup that it has.
You can extend multiple now, as of TS 5
As is common, documentation is incomplete, and not the source of truth :upside_down_face:
Hi folks. Just came across this as I'm experiencing it too. Just wanted to add a slight bit of colour as I don't see the exact solution here.
I have a new ember app as of last week (Ember v5.5.0) and all the deps that brings with it.
"ember-template-imports": "^4.0.0",
"@glint/core": "^1.2.2",
I can confirm that the issue was due to the multiple extends. So the following changed fixed it:
- "extends": [
- "@tsconfig/strictest/tsconfig.json",
- "@tsconfig/ember/tsconfig.json"
- ],
+ "extends": "@tsconfig/ember/tsconfig.json"
Now, the bit that I didn't see here is why "@tsconfig/strictest/tsconfig.json" existed and how we can continue to use it. So, turns out the docs suggest adding that extends in typescript/additional-resources/faq/#toc_strictness.
So, are we saying that we shouldn't be doing that at all and need to change the docs? Or, is there some other way that this should work that I'm missing?
are we saying that we shouldn't be doing that at all and need to change the docs?
glint needs to support this. It's a feature of ts 5.0 :)
I’ve opened a separate issue #672
I’m getting the following error on every file I try to open in VSCode.
I think this output in Extension host is related:
This is a new project, Ember 5.5 with ember template imports and no extra addons, running on Node 20.10.0