nova-typescript
nova-typescript copied to clipboard
Code action for installing @types not working
Hi 👋
So basically the code action for installing @ types doesn't actually install anything. Not sure if it is Nova LSP support related or extension.
Initially the extension was trying to access node & npm in some unusual location /usr/local/Cellar/node/18.7.0/bin
. So I created a symlink to /usr/local/bin/
which led to the extension working fine.
To reproduce
Steps to reproduce the behavior:
- Open any .ts file
- npm I 'whatever package without their @ types' [but make sure the package actually has one on npm]
- in the .ts file import the package
- move the cursor to the 'package'
- trigger code action
- click on install @ type and you will see nothing will happen7. ***Expected behavior
Expected behavior
Basically like VScode, when importing a package the intellisense will suggest if we want to install @ type. Of course once the code action is triggered, the lsp installs the package and update package.json for us, rather than us manually doing all.
Screenshots
Environment
- Nova version: 9.5
- Extension version: 2.5.0
- TypeScript version: none in the project as I am using vitejs but in console says
[lspserver] Resolved TypeScript version to "4.7.2"
- Sidebar information: running 4.7.2
- macOS version: 12.5.1
- NodeJS information:
- node version: 18.7.0
- npm version: 8.15.0
- installation method: brew
Extension console output
`TypeScript[23:17:01.614000] activating...
TypeScript[23:17:01.619000] dependencyManagement: claimed lock
TypeScript[23:17:02.038000] dependencyManagement: installing:
TypeScript[23:17:02.038000] dependencyManagement: installing: up to date in 171ms
TypeScript[23:17:02.039000] dependencyManagement: installing:
TypeScript[23:17:02.039000] dependencyManagement: installing: 12 packages are looking for funding
TypeScript[23:17:02.039000] dependencyManagement: installing: run npm fund
for details
TypeScript[23:17:02.045000] dependencyManagement: clearing lock
TypeScript[23:17:02.048000] using tslib at: /Users/Emran/Library/Application Support/Nova/Extensions/apexskier.typescript/dependencyManagement/node_modules/typescript/lib
TypeScript[23:17:02.089000] activated
TypeScript Language Server[23:17:02.406000] [lspserver] Resolving user-provided tsserver path "/Users/Emran/Library/Application Support/Nova/Extensions/apexskier.typescript/dependencyManagement/node_modules/typescript/lib/tsserver.js"...
TypeScript Language Server[23:17:02.406000] [lspserver] Resolved directory path from a file path: /Users/Emran/Library/Application Support/Nova/Extensions/apexskier.typescript/dependencyManagement/node_modules/typescript/lib
TypeScript Language Server[23:17:02.406000] [lspserver] Resolved package.json location: "/Users/Emran/Library/Application Support/Nova/Extensions/apexskier.typescript/dependencyManagement/node_modules/typescript/package.json"
TypeScript Language Server[23:17:02.407000] [lspserver] Assumed tsserver lib location: "/Users/Emran/Library/Application Support/Nova/Extensions/apexskier.typescript/dependencyManagement/node_modules/typescript/lib"
TypeScript Language Server[23:17:02.407000] [lspserver] Resolving TypeScript version from path "/Users/Emran/Library/Application Support/Nova/Extensions/apexskier.typescript/dependencyManagement/node_modules/typescript/lib/tsserver.js"...
TypeScript Language Server[23:17:02.407000] [lspserver] Reading version from package.json at "/Users/Emran/Library/Application Support/Nova/Extensions/apexskier.typescript/dependencyManagement/node_modules/typescript/package.json"
TypeScript Language Server[23:17:02.407000] [lspserver] Resolved TypeScript version to "4.7.2"
TypeScript Language Server[23:17:02.407000] [lspserver] Using Typescript version (user-setting) 4.7.2 from path "/Users/Emran/Library/Application Support/Nova/Extensions/apexskier.typescript/dependencyManagement/node_modules/typescript/lib/tsserver.js" `
Thanks Emran 😊