Error while launching the language server
See original GitHub issueI have followed the Development Setup,
pnpm install
pnpm run build
But I have encountered several errors:
extension\src\index.ts → extension/dist/extension/index.browser.js...
> node_modules/.pnpm/minimatch@3.1.2/node_modules/minimatch/minimatch.js:4:47: error: Plugin "rollup" returned a non-absolute path: path (set a namespace if this is not a file path)
4 │ var path = (function () { try { return require('path') } catch (e) {}}()) || {
╵ ~~~~~~
[!] (plugin esbuild) Error: Build failed with 1 error:
node_modules/.pnpm/minimatch@3.1.2/node_modules/minimatch/minimatch.js:4:47: error: Plugin "rollup" returned a non-absolute path: path (set a namespace if this is not a file path)
Error: Build failed with 1 error:
node_modules/.pnpm/minimatch@3.1.2/node_modules/minimatch/minimatch.js:4:47: error: Plugin "rollup" returned a non-absolute path: path (set a namespace if this is not a file path)
at failureErrorWithLog (C:\Users\xxx\Downloads\workspace\grammarly\node_modules\.pnpm\esbuild@0.12.29\node_modules\esbuild\lib\main.js:1475:15)
at C:\Users\xxx\Downloads\workspace\grammarly\node_modules\.pnpm\esbuild@0.12.29\node_modules\esbuild\lib\main.js:1133:28
at runOnEndCallbacks (C:\Users\xxx\Downloads\workspace\grammarly\node_modules\.pnpm\esbuild@0.12.29\node_modules\esbuild\lib\main.js:923:63)
at buildResponseToResult (C:\Users\xxx\Downloads\workspace\grammarly\node_modules\.pnpm\esbuild@0.12.29\node_modules\esbuild\lib\main.js:1131:7)
at C:\Users\xxx\Downloads\workspace\grammarly\node_modules\.pnpm\esbuild@0.12.29\node_modules\esbuild\lib\main.js:1240:14
at C:\Users\xxx\Downloads\workspace\grammarly\node_modules\.pnpm\esbuild@0.12.29\node_modules\esbuild\lib\main.js:611:9
at handleIncomingPacket (C:\Users\xxx\Downloads\workspace\grammarly\node_modules\.pnpm\esbuild@0.12.29\node_modules\esbuild\lib\main.js:708:9)
at Socket.readFromStdout (C:\Users\xxx\Downloads\workspace\grammarly\node_modules\.pnpm\esbuild@0.12.29\node_modules\esbuild\lib\main.js:578:7)
at Socket.emit (node:events:526:28)
at addChunk (node:internal/streams/readable:315:12)
And if I tried to start the language server, I get:
C:\Users\xxx\Downloads\workspace\grammarly\packages\grammarly-languageserver\dist\index.cjs.js:6
const fetch = require('node-fetch');
^
Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Users\xxx\Downloads\workspace\grammarly\node_modules\.pnpm\node-fetch@3.2.4\node_modules\node-fetch\src\index.js from C:\Users\xxx\Downloads\workspace\_backup\grammarly\packages\grammarly-languageserver\dist\index.cjs.js not supported.
Instead change the require of index.js in C:\Users\xxx\Downloads\workspace\grammarly\packages\grammarly-languageserver\dist\index.cjs.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (C:\Users\xxx\Downloads\workspace\grammarly\packages\grammarly-languageserver\dist\index.cjs.js:6:15)
at Object.<anonymous> (C:\Users\xxx\Downloads\workspace\grammarly\packages\grammarly-languageserver\bin\server.js:3:16) {
code: ←[32m'ERR_REQUIRE_ESM'←[39m
Any idea are appreciated!
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Error occurred in initializing language server when opening ...
Type: Bug. I checked out a Maven Project with multiple modules (main POM.xml and nested project with POM.xml files) and was able to...
Read more >Troubleshooting - LSP for Sublime Text
If the server is crashing on startup, try running LSP: Troubleshoot server from the Command Palette and check the "Server output" for potential...
Read more >The DAML language server crashed 5 times in last 3 minutes ...
I am following the 'Introduction to DAML' course and getting this error message when opening Main.daml from VS code. I have tried installing/uninstalling ......
Read more >VSCode can't start InterSystems Language Server
Hi, I have VSCode on my Windows 10 notebook with intersystems-community.objectscript-pack installed. I'm successfully connected to remote IRIS (2021.1).
Read more >Troubleshooting - haskell-language-server - Read the Docs
If the server isn't running at all when you are editing a Haskell file in your project, then that suggests that the client...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes. It will be fixed by #240
Continue reporting 😅
I guess I need to separate web extension.