Closed aboimpinto closed 2 years ago
In general you need to package (webpack) the client and server independently. You might want to look at this repository on how to do this: https://github.com/microsoft/vscode-eslint
When you webpack the extension side you should exclude the tests or have the test in a separate folder.
I will close the issue since there is IMO no action required. You can still add comments so we can continue the discussion.
Thanks for the answer ...
what I did already:
still don't know why I have the error
$ npm run webpack
> avalonia-vscode-extension@0.0.3 webpack
> webpack --mode development
asset extension.js 792 KiB [compared for emit] (name: main) 1 related asset
runtime modules 937 bytes 4 modules
modules by path ./node_modules/ 670 KiB 135 modules
modules by path ./src/*.ts 31.2 KiB
./src/extension.ts 2.32 KiB [built] [code generated] [1 error]
./src/AvaloniaNewProjectManager.ts 2.94 KiB [built] [code generated]
./src/AvaloniaProjectProvider.ts 1.28 KiB [built] [code generated]
./src/AvaloniaNewFileManager.ts 4.52 KiB [built] [code generated]
./src/CreateNewAppPanel.ts 5.41 KiB [built] [code generated]
+ 7 modules
+ 8 modules
ERROR in /home/esqueleto/myWork/Avalonia.VSCodeExtension/src/extension.ts
./src/extension.ts 11:7-35
[tsl] ERROR in /home/esqueleto/myWork/Avalonia.VSCodeExtension/src/extension.ts(11,8)
TS2792: Cannot find module 'vscode-languageclient/node'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?
ts-loader-default_4f8b3ed5ab8e20ee
webpack 5.70.0 compiled with 1 error in 1762 ms
when I do
$ vsce ls | grep vscode-languageclient/node
node_modules/vscode-languageclient/node.cmd
node_modules/vscode-languageclient/node.js
It's missing anything?
I actually have no idea. The file it should include is node_modules/vscode-languageclient/node.js
which is obviously there. My guess is some configuration missing / wrong in the webpack config. But it is simply a guess.
I'm facing this issue as well. The language client code is in a separate package and is imported in package.json
. This error occurs when I set "module": "esnext"
in tsconfig. Using "module": "NodeNext"
or "module": "node16"
the error goes away.
However, I want to use features from esnext. Can we reopen this issue until it's solved?
The libraries have not been tested with esnext
module loading. I recommend that you open a new issue and request support for that mode.
Hello guys,
I have this extension https://github.com/AvaloniaUI/Avalonia.VSCodeExtension
I can run perfectly locally but when I try to package, the svetle views aren't being included. After some investigation, looks like I have to use the WebPack to take everything in the scr folder.
I add the WebPack and WebPack-Cli, created entries in the package.json for the webpack and add a webpack.config.js as described here https://code.visualstudio.com/api/working-with-extensions/bundling-extension
When I run the command $ npm run webpack
I got this result:
after some investigation in the closed issued in this repository, I realise the command
I'm confused. Is this a problem regarding the component vscode-languagerclient/node or some problem with the node_modules?
I have no idea how to solve one or another.
Can anyone help me? Thanks in advance Paulo Aboim Pinto