3

I'm trying to create a language server for VSCode. It's made up of a client and a server, communicating over RPC.

The official docs have a working example, with the language-server split into in two directories, the client and the server.

What I want to do is to package both into a VSIX file, so I can install them together.

In their example, they say cd to the client directory and run vsce package. However, If I do that and install the resultant package, VSCode says

"Error: Cannot find module '/home/blah/vscode.language-client-example-0.0.1/server/server.js"

I can't run vsce package in the server directory, as it complains

"Error: Missing publisher name"

How do I package it?

Gama11
  • 31,714
  • 9
  • 78
  • 100
Charles Shiller
  • 1,013
  • 4
  • 13
  • 32
  • "I'm trying to create a language server for VSCode." -> if you're doing a Language Server, it should be for more than VSCode ;) – Mickael Aug 12 '17 at 08:36

2 Answers2

0

You can publish extension and try. Official doc for publishing extensions

In short for publishing, follow below steps

  1. npm install -g vsce
  2. vsce publish
Raj
  • 3,890
  • 7
  • 52
  • 80
0

Both for packaging as well as publishing you need to register a publisher.

In the docs they explain how to create a publisher for yourself: https://code.visualstudio.com/api/working-with-extensions/publishing-extension#create-a-publisher

Then in your (root) package.json add your publisher id: "publisher": "my-publisher"

After that both package and publish should work with vsce.

obiwanjacobi
  • 2,413
  • 17
  • 27