zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
48.55k stars 2.9k forks source link

Failed to execute npm commands #19340

Open micskeil opened 2 days ago

micskeil commented 2 days ago

Check for existing issues

Describe the bug / provide steps to reproduce it

When loading any project Zed starts to download the Language servers. It fails seemingly during executing npm commands

Environment

OS: Ubuntu 22.04 jammy Kernel: x86_64 Linux 6.8.0-45-generic Uptime: 10h 51m Packages: 2731 Shell: bash 5.1.16 Resolution: 5760x2160 DE: GNOME 41.7 WM: Mutter WM Theme: Adwaita GTK Theme: Yaru-magenta-dark [GTK2/3] Icon Theme: Yaru-magenta Font: Ubuntu 11 Disk: 73G / 939G (9%) CPU: AMD Ryzen 7 PRO 7840U w/ Radeon 780M Graphics @ 16x 5.132GHz GPU: AMD/ATI RAM: 7596MiB / 59911MiB

If applicable, add mockups / screenshots to help explain present your vision of the feature

image

If applicable, attach your Zed.log file to this issue.

Zed.log

2024-10-17T07:39:20.916937554+02:00 [INFO] extensions updated. loading 1, reloading 0, unloading 0
2024-10-17T07:39:20.918223524+02:00 [WARN] Default prettier installation had failed 5 times, not attempting again
2024-10-17T07:39:20.918454751+02:00 [WARN] Default prettier installation had failed 5 times, not attempting again
2024-10-17T07:39:21.006784977+02:00 [WARN] Default prettier installation had failed 5 times, not attempting again
2024-10-17T07:39:21.00695614+02:00 [WARN] Default prettier installation had failed 5 times, not attempting again
2024-10-17T07:39:21.008563588+02:00 [WARN] request completed with error: failed to connect to the server
2024-10-17T07:39:21.008701549+02:00 [WARN] Default prettier installation had failed 5 times, not attempting again
2024-10-17T07:39:21.008757224+02:00 [WARN] Default prettier installation had failed 5 times, not attempting again
2024-10-17T07:39:21.009314096+02:00 [WARN] request completed with error: failed to connect to the server
2024-10-17T07:39:22.276618229+02:00 [WARN] Default prettier installation had failed 5 times, not attempting again
2024-10-17T07:39:22.276696918+02:00 [WARN] Default prettier installation had failed 5 times, not attempting again
2024-10-17T07:39:22.277765367+02:00 [WARN] request completed with error: failed to connect to the server
2024-10-17T07:39:25.696486449+02:00 [WARN] Default prettier installation had failed 5 times, not attempting again
2024-10-17T07:39:25.696553776+02:00 [WARN] Default prettier installation had failed 5 times, not attempting again
2024-10-17T07:39:25.697649577+02:00 [WARN] request completed with error: failed to connect to the server
2024-10-17T07:39:41.666521239+02:00 [INFO] Summarizing updated entries took 5.75µs
2024-10-17T07:39:41.794902519+02:00 [ERROR] failed to fetch cached embeddings via cloud model

Caused by:
    RPC request GetCachedEmbeddings failed: permission denied
2024-10-17T07:40:30.981134662+02:00 [INFO] stopping language server vue-language-server
2024-10-17T07:40:30.981216877+02:00 [INFO] stopping language server tailwindcss-language-server
2024-10-17T07:40:30.98126106+02:00 [INFO] stopping language server eslint
2024-10-17T07:40:30.981480656+02:00 [INFO] attempting to start language server "vue-language-server", path: "/home/lami/mms/fdm/frld-editor", id: 11
2024-10-17T07:40:30.981544256+02:00 [INFO] attempting to start language server "tailwindcss-language-server", path: "/home/lami/mms/fdm/frld-editor", id: 12
2024-10-17T07:40:30.981601835+02:00 [INFO] attempting to start language server "eslint", path: "/home/lami/mms/fdm/frld-editor", id: 13
2024-10-17T07:40:30.981706002+02:00 [INFO] fetching latest version of language server "tailwindcss-language-server"
2024-10-17T07:40:30.986563934+02:00 [INFO] using project environment for language server LanguageServerName("eslint")
2024-10-17T07:40:30.986654104+02:00 [INFO] starting language server process. binary path: "/home/lami/.nvm/versions/node/v18.18.2/bin/node", working directory: "/home/lami/mms/fdm/frld-editor", args: ["--max-old-space-size=8192", "/home/lami/.local/share/zed/languages/eslint/vscode-eslint-2.4.4/vscode-eslint/server/out/eslintServer.js", "--stdio"]
2024-10-17T07:40:31.021979536+02:00 [ERROR] cannot read LSP message headers
2024-10-17T07:40:31.022291786+02:00 [ERROR] Broken pipe (os error 32)
2024-10-17T07:40:31.022442301+02:00 [ERROR] server shut down
2024-10-17T07:40:31.022550595+02:00 [ERROR] Failed to start language server "eslint": oneshot canceled
2024-10-17T07:40:31.022623333+02:00 [ERROR] server stderr: "node:internal/modules/cjs/loader:1080\n  throw err;\n  ^\n\nError: Cannot find module '/home/lami/.local/share/zed/languages/eslint/vscode-eslint-2.4.4/vscode-eslint/server/out/eslintServer.js'\n    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)\n    at Module._load (node:internal/modules/cjs/loader:922:27)\n    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)\n    at node:internal/main/run_main_module:23:47 {\n  code: 'MODULE_NOT_FOUND',\n  requireStack: []\n}\n\nNode.js v18.18.2\n"
2024-10-17T07:40:38.496666299+02:00 [ERROR] no cached binary
2024-10-17T07:40:38.496837082+02:00 [ERROR] Failed to start language server "tailwindcss-language-server": failed to execute npm info subcommand:
stdout: "{\n  \"error\": {\n    \"code\": \"ECONNREFUSED\",\n    \"summary\": \"FetchError: request to http://registry.npmjs.org/@tailwindcss%2flanguage-server failed, reason: connect ECONNREFUSED 2606:4700::6810:1f22:80\",\n    \"detail\": \"\\nIf you are behind a proxy, please make sure that the\\n'proxy' config is set properly.  See: 'npm help config'\"\n  }\n}\n"
stderr: "npm ERR! code ECONNREFUSED\nnpm ERR! syscall connect\nnpm ERR! errno ECONNREFUSED\nnpm ERR! FetchError: request to http://registry.npmjs.org/@tailwindcss%2flanguage-server failed, reason: connect ECONNREFUSED 2606:4700::6810:1f22:80\nnpm ERR!     at ClientRequest. (/home/lami/.nvm/versions/node/v18.18.2/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)\nnpm ERR!     at ClientRequest.emit (node:events:517:28)\nnpm ERR!     at Socket.socketErrorListener (node:_http_client:501:9)\nnpm ERR!     at Socket.emit (node:events:529:35)\nnpm ERR!     at emitErrorNT (node:internal/streams/destroy:151:8)\nnpm ERR!     at emitErrorCloseNT (node:internal/streams/destroy:116:3)\nnpm ERR!     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\nnpm ERR!  FetchError: request to http://registry.npmjs.org/@tailwindcss%2flanguage-server failed, reason: connect ECONNREFUSED 2606:4700::6810:1f22:80\nnpm ERR!     at ClientRequest. (/home/lami/.nvm/versions/node/v18.18.2/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)\nnpm ERR!     at ClientRequest.emit (node:events:517:28)\nnpm ERR!     at Socket.socketErrorListener (node:_http_client:501:9)\nnpm ERR!     at Socket.emit (node:events:529:35)\nnpm ERR!     at emitErrorNT (node:internal/streams/destroy:151:8)\nnpm ERR!     at emitErrorCloseNT (node:internal/streams/destroy:116:3)\nnpm ERR!     at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {\nnpm ERR!   code: 'ECONNREFUSED',\nnpm ERR!   errno: 'ECONNREFUSED',\nnpm ERR!   syscall: 'connect',\nnpm ERR!   address: '2606:4700::6810:1f22',\nnpm ERR!   port: 80,\nnpm ERR!   type: 'system'\nnpm ERR! }\nnpm ERR! \nnpm ERR! If you are behind a proxy, please make sure that the\nnpm ERR! 'proxy' config is set properly.  See: 'npm help config'\n\nnpm ERR! A complete log of this run can be found in: /home/lami/.local/share/zed/node/cache/_logs/2024-10-17T05_40_31_326Z-debug-0.log\n"
2024-10-17T07:40:38.49694739+02:00 [ERROR] server stderr: ""
2024-10-17T07:40:38.74066116+02:00 [ERROR] Failed to start language server "vue-language-server": failed to execute npm install subcommand:
stdout: ""
stderr: "npm ERR! code ECONNREFUSED\nnpm ERR! syscall connect\nnpm ERR! errno ECONNREFUSED\nnpm ERR! FetchError: request to https://registry.npmjs.org/@vue%2flanguage-server failed, reason: connect ECONNREFUSED 2606:4700::6810:1d22:443\nnpm ERR!     at ClientRequest. (/home/lami/.nvm/versions/node/v18.18.2/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)\nnpm ERR!     at ClientRequest.emit (node:events:517:28)\nnpm ERR!     at TLSSocket.socketErrorListener (node:_http_client:501:9)\nnpm ERR!     at TLSSocket.emit (node:events:529:35)\nnpm ERR!     at emitErrorNT (node:internal/streams/destroy:151:8)\nnpm ERR!     at emitErrorCloseNT (node:internal/streams/destroy:116:3)\nnpm ERR!     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\nnpm ERR!  FetchError: request to https://registry.npmjs.org/@vue%2flanguage-server failed, reason: connect ECONNREFUSED 2606:4700::6810:1d22:443\nnpm ERR!     at ClientRequest. (/home/lami/.nvm/versions/node/v18.18.2/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)\nnpm ERR!     at ClientRequest.emit (node:events:517:28)\nnpm ERR!     at TLSSocket.socketErrorListener (node:_http_client:501:9)\nnpm ERR!     at TLSSocket.emit (node:events:529:35)\nnpm ERR!     at emitErrorNT (node:internal/streams/destroy:151:8)\nnpm ERR!     at emitErrorCloseNT (node:internal/streams/destroy:116:3)\nnpm ERR!     at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {\nnpm ERR!   code: 'ECONNREFUSED',\nnpm ERR!   errno: 'ECONNREFUSED',\nnpm ERR!   syscall: 'connect',\nnpm ERR!   address: '2606:4700::6810:1d22',\nnpm ERR!   port: 443,\nnpm ERR!   type: 'system',\nnpm ERR!   requiredBy: '.'\nnpm ERR! }\nnpm ERR! \nnpm ERR! If you are behind a proxy, please make sure that the\nnpm ERR! 'proxy' config is set properly.  See: 'npm help config'\n\nnpm ERR! A complete log of this run can be found in: /home/lami/.local/share/zed/node/cache/_logs/2024-10-17T05_40_31_519Z-debug-0.log\n"
2024-10-17T07:40:38.740816504+02:00 [ERROR] server stderr: ""

notpeter commented 1 day ago

You're getting ECONNREFUSED and it's attempting to operate over IPv6. Do you perhaps have a network with partially broken IPv6? Can you try forcing IPv4 and see you have better results?