eclipse-glsp / glsp

Graphical language server platform for building web-based diagram editors
https://www.eclipse.dev/glsp
Other
203 stars 33 forks source link

"project-templates" examples for node can not be build #1430

Open cbries opened 13 hours ago

cbries commented 13 hours ago

project-templates can not be build. I tried to build node-json-theia and node-json-vscode, different build issues raised.

I did the following based on this documentation:

https://eclipse.dev/glsp/documentation/gettingstarted/

1) git clone https://github.com/eclipse-glsp/glsp-examples.git

current commit hash: e55606e37be62888309a97b765a1335807477a13

2) cd glsp-examples/project-templates

3) cd node-json-theia

4) yarn

Result:

  NSFW.cpp
C:\git\tmp-theia2\glsp-examples\project-templates\node-json-theia\node_modules\nsfw\includes\win32\Watcher.h(40,19): error C4596: 'isExcluded': illegal qualified name in member declaration [C:\git\tmp-theia2\glsp-examples\project-templates\node
-json-theia\node_modules\nsfw\build\nsfw.vcxproj]
  (compiling source file '../src/NSFW.cpp')

C:\git\tmp-theia2\glsp-examples\project-templates\node-json-theia\node_modules\nsfw\includes\win32\Watcher.h(42,27): error C4596: 'getWatchedPathFromHandle': illegal qualified name in member declaration [C:\git\tmp-theia2\glsp-examples\project-
templates\node-json-theia\node_modules\nsfw\build\nsfw.vcxproj]
  (compiling source file '../src/NSFW.cpp')

C:\git\tmp-theia2\glsp-examples\project-templates\node-json-theia\node_modules\nsfw\includes\win32\Watcher.h(43,19): error C4596: 'checkWatchedPath': illegal qualified name in member declaration [C:\git\tmp-theia2\glsp-examples\project-template
s\node-json-theia\node_modules\nsfw\build\nsfw.vcxproj]
  (compiling source file '../src/NSFW.cpp')

image

5) cd ../node-json-vscode

6) yarn

Result:

WARNING in ../../node_modules/ws/lib/buffer-util.js 117:23-44
Module not found: Error: Can't resolve 'bufferutil' in 'C:\git\tmp-theia2\glsp-examples\project-templates\node-json-vscode\node_modules\ws\lib'
 @ ../../node_modules/ws/lib/websocket.js 31:21-45
 @ ../../node_modules/ws/index.js 3:18-44
 @ ../../node_modules/@eclipse-glsp/vscode-integration/lib/node/quickstart-components/socket-glsp-vscode-server.js 23:13-26
 @ ../../node_modules/@eclipse-glsp/vscode-integration/lib/node/index.js 34:13-73
 @ ../../node_modules/@eclipse-glsp/vscode-integration/node.js 18:0-44
 @ ./src/tasklist-extension.ts 22:15-63

WARNING in ../../node_modules/ws/lib/validation.js 122:24-49
Module not found: Error: Can't resolve 'utf-8-validate' in 'C:\git\tmp-theia2\glsp-examples\project-templates\node-json-vscode\node_modules\ws\lib'
 @ ../../node_modules/ws/lib/receiver.js 13:43-66
 @ ../../node_modules/ws/index.js 7:21-46
 @ ../../node_modules/@eclipse-glsp/vscode-integration/lib/node/quickstart-components/socket-glsp-vscode-server.js 23:13-26
 @ ../../node_modules/@eclipse-glsp/vscode-integration/lib/node/index.js 34:13-73
 @ ../../node_modules/@eclipse-glsp/vscode-integration/node.js 18:0-44
 @ ./src/tasklist-extension.ts 22:15-63

2 warnings have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.89.0 compiled with 2 warnings in 2636 ms
Done in 17.34s.
Done in 56.27s.

image

martin-fleck-at commented 3 hours ago

@cbries Very interesting, I cannot reproduce the issues you are seeing on my machine. From the error messages I take it you are on Windows, is that correct? Which Node version are you using? I just tried to build everything with Node 22, Node 20, and Node 18 and the build went through. The error seems to happen in a native node module 'nsfw' so that really is a platform-specific error and seems to be related to the CPP compilation. Have you installed all the prerequisites from Theia? Unfortunately, I'm not on Windows so it is a bit hard to test this for me.

Regarding the utf-8-validate error that you are seeing, I think that is actually just a warning and the build runs through, see https://github.com/eclipse-glsp/glsp/discussions/1079. Do you have problems starting it?