Title: Reported npm error gyp ERR! stack Error: `gyp` failed with exit code: 1 when installing on Windows with npm · Issue #7380 · coder/code-server · GitHub
Open Graph Title: Reported npm error gyp ERR! stack Error: `gyp` failed with exit code: 1 when installing on Windows with npm · Issue #7380 · coder/code-server
X Title: Reported npm error gyp ERR! stack Error: `gyp` failed with exit code: 1 when installing on Windows with npm · Issue #7380 · coder/code-server
Description: Is there an existing issue for this? I have searched the existing issues OS/Web Information Local OS: Windows Steps to Reproduce Install the dependencies of VS2022 and npm run npm i code-server -g Error message are produced Expected Code...
Open Graph Description: Is there an existing issue for this? I have searched the existing issues OS/Web Information Local OS: Windows Steps to Reproduce Install the dependencies of VS2022 and npm run npm i code-server -g ...
X Description: Is there an existing issue for this? I have searched the existing issues OS/Web Information Local OS: Windows Steps to Reproduce Install the dependencies of VS2022 and npm run npm i code-server -g ...
Opengraph URL: https://github.com/coder/code-server/issues/7380
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Reported npm error gyp ERR! stack Error: `gyp` failed with exit code: 1 when installing on Windows with npm","articleBody":"### Is there an existing issue for this?\n\n- [x] I have searched the existing issues\n\n### OS/Web Information\n\n- Local OS: Windows\n\n\n### Steps to Reproduce\n\n1. Install the dependencies of VS2022 and npm\n2. run `npm i code-server -g`\n3. Error message are produced\n\n\n### Expected\n\nCode-server should be installed and ready to be used.\n\n### Actual\n\nC:\\Users\\USER\\Desktop\\servers\\vscode>npm install code-server -g\nnpm warn cleanup Failed to remove some directories [\nnpm warn cleanup [\nnpm warn cleanup '\\\\\\\\?\\\\C:\\\\Users\\\\USER\\\\AppData\\\\Roaming\\\\npm\\\\node_modules\\\\code-server',\nnpm warn cleanup [Error: EPERM: operation not permitted, rmdir 'C:\\Users\\USER\\AppData\\Roaming\\npm\\node_modules\\code-server\\node_modules'] {\nnpm warn cleanup errno: -4048,\nnpm warn cleanup code: 'EPERM',\nnpm warn cleanup syscall: 'rmdir',\nnpm warn cleanup path: 'C:\\\\Users\\\\USER\\\\AppData\\\\Roaming\\\\npm\\\\node_modules\\\\code-server\\\\node_modules'\nnpm warn cleanup }\nnpm warn cleanup ]\nnpm warn cleanup ]\nnpm error code 1\nnpm error path C:\\Users\\USER\\AppData\\Roaming\\npm\\node_modules\\code-server\\node_modules\\argon2\nnpm error command failed\nnpm error command C:\\Windows\\system32\\cmd.exe /d /s /c node-gyp rebuild\nnpm error gyp info it worked if it ends with ok\nnpm error gyp info using node-gyp@11.0.0\nnpm error gyp info using node@22.16.0 | win32 | x64\nnpm error gyp info find Python using Python version 3.13.5 found at \"C:\\Users\\USER\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\\python.exe\"\nnpm error gyp info find VS using VS2022 (17.14.36212.18) found at:\nnpm error gyp info find VS \"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\"\nnpm error gyp info find VS run with --verbose for detailed information\nnpm error gyp info spawn C:\\Users\\USER\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\\python.exe\nnpm error gyp info spawn args [\nnpm error gyp info spawn args 'C:\\\\Users\\\\USER\\\\AppData\\\\Local\\\\nvm\\\\v22.16.0\\\\node_modules\\\\npm\\\\node_modules\\\\node-gyp\\\\gyp\\\\gyp_main.py',\nnpm error gyp info spawn args 'binding.gyp',\nnpm error gyp info spawn args '-f',\nnpm error gyp info spawn args 'msvs',\nnpm error gyp info spawn args '-I',\nnpm error gyp info spawn args 'C:\\\\Users\\\\USER\\\\AppData\\\\Roaming\\\\npm\\\\node_modules\\\\code-server\\\\node_modules\\\\argon2\\\\build\\\\config.gypi',\nnpm error gyp info spawn args '-I',\nnpm error gyp info spawn args 'C:\\\\Users\\\\USER\\\\AppData\\\\Local\\\\nvm\\\\v22.16.0\\\\node_modules\\\\npm\\\\node_modules\\\\node-gyp\\\\addon.gypi',\nnpm error gyp info spawn args '-I',\nnpm error gyp info spawn args 'C:\\\\Users\\\\USER\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\22.16.0\\\\include\\\\node\\\\common.gypi',\nnpm error gyp info spawn args '-Dlibrary=shared_library',\nnpm error gyp info spawn args '-Dvisibility=default',\nnpm error gyp info spawn args '-Dnode_root_dir=C:\\\\Users\\\\USER\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\22.16.0',\nnpm error gyp info spawn args '-Dnode_gyp_dir=C:\\\\Users\\\\USER\\\\AppData\\\\Local\\\\nvm\\\\v22.16.0\\\\node_modules\\\\npm\\\\node_modules\\\\node-gyp',\nnpm error gyp info spawn args '-Dnode_lib_file=C:\\\\\\\\Users\\\\\\\\USER\\\\\\\\AppData\\\\\\\\Local\\\\\\\\node-gyp\\\\\\\\Cache\\\\\\\\22.16.0\\\\\\\\\u003c(target_arch)\\\\\\\\node.lib',\nnpm error gyp info spawn args '-Dmodule_root_dir=C:\\\\Users\\\\USER\\\\AppData\\\\Roaming\\\\npm\\\\node_modules\\\\code-server\\\\node_modules\\\\argon2',\nnpm error gyp info spawn args '-Dnode_engine=v8',\nnpm error gyp info spawn args '--depth=.',\nnpm error gyp info spawn args '--no-parallel',\nnpm error gyp info spawn args '--generator-output',\nnpm error gyp info spawn args 'C:\\\\Users\\\\USER\\\\AppData\\\\Roaming\\\\npm\\\\node_modules\\\\code-server\\\\node_modules\\\\argon2\\\\build',\nnpm error gyp info spawn args '-Goutput_dir=.'\nnpm error gyp info spawn args ]\nnpm error gyp: Undefined variable module_name in binding.gyp while trying to load binding.gyp\nnpm error gyp ERR! configure error\nnpm error gyp ERR! stack Error: `gyp` failed with exit code: 1\nnpm error gyp ERR! stack at ChildProcess.\u003canonymous> (C:\\Users\\USER\\AppData\\Local\\nvm\\v22.16.0\\node_modules\\npm\\node_modules\\node-gyp\\lib\\configure.js:317:18)\nnpm error gyp ERR! stack at ChildProcess.emit (node:events:518:28)\nnpm error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:293:12)\nnpm error gyp ERR! System Windows_NT 10.0.22000\nnpm error gyp ERR! command \"C:\\\\nvm4w\\\\nodejs\\\\node.exe\" \"C:\\\\Users\\\\USER\\\\AppData\\\\Local\\\\nvm\\\\v22.16.0\\\\node_modules\\\\npm\\\\node_modules\\\\node-gyp\\\\bin\\\\node-gyp.js\" \"rebuild\"\nnpm error gyp ERR! cwd C:\\Users\\USER\\AppData\\Roaming\\npm\\node_modules\\code-server\\node_modules\\argon2\nnpm error gyp ERR! node -v v22.16.0\nnpm error gyp ERR! node-gyp -v v11.0.0\nnpm error gyp ERR! not ok\nnpm error A complete log of this run can be found in: C:\\Users\\USER\\AppData\\Local\\npm-cache\\_logs\\2025-06-18T19_48_19_610Z-debug-0.log\n\nC:\\Users\\USER\\Desktop\\servers\\vscode>npm install --global code-server\nnpm warn cleanup Failed to remove some directories [\nnpm warn cleanup [\nnpm warn cleanup '\\\\\\\\?\\\\C:\\\\Users\\\\USER\\\\AppData\\\\Roaming\\\\npm\\\\node_modules\\\\code-server',\nnpm warn cleanup [Error: EPERM: operation not permitted, rmdir 'C:\\Users\\USER\\AppData\\Roaming\\npm\\node_modules\\code-server\\lib\\vscode\\out\\vs\\workbench\\browser\\parts'] {\nnpm warn cleanup errno: -4048,\nnpm warn cleanup code: 'EPERM',\nnpm warn cleanup syscall: 'rmdir',\nnpm warn cleanup path: 'C:\\\\Users\\\\USER\\\\AppData\\\\Roaming\\\\npm\\\\node_modules\\\\code-server\\\\lib\\\\vscode\\\\out\\\\vs\\\\workbench\\\\browser\\\\parts'\nnpm warn cleanup }\nnpm warn cleanup ],\nnpm warn cleanup [\nnpm warn cleanup 'C:\\\\Users\\\\USER\\\\AppData\\\\Roaming\\\\npm\\\\node_modules\\\\code-server',\nnpm warn cleanup [Error: EPERM: operation not permitted, rmdir 'C:\\Users\\USER\\AppData\\Roaming\\npm\\node_modules\\code-server\\lib\\vscode\\out\\vs\\workbench\\contrib\\welcomeGettingStarted\\common\\media\\notebookThemes'] {\nnpm warn cleanup errno: -4048,\nnpm warn cleanup code: 'EPERM',\nnpm warn cleanup syscall: 'rmdir',\nnpm warn cleanup path: 'C:\\\\Users\\\\USER\\\\AppData\\\\Roaming\\\\npm\\\\node_modules\\\\code-server\\\\lib\\\\vscode\\\\out\\\\vs\\\\workbench\\\\contrib\\\\welcomeGettingStarted\\\\common\\\\media\\\\notebookThemes'\nnpm warn cleanup }\nnpm warn cleanup ]\nnpm warn cleanup ]\nnpm error code 1\nnpm error path C:\\Users\\USER\\AppData\\Roaming\\npm\\node_modules\\code-server\\node_modules\\argon2\nnpm error command failed\nnpm error command C:\\Windows\\system32\\cmd.exe /d /s /c node-gyp rebuild\nnpm error gyp info it worked if it ends with ok\nnpm error gyp info using node-gyp@11.0.0\nnpm error gyp info using node@22.16.0 | win32 | x64\nnpm error gyp info find Python using Python version 3.13.5 found at \"C:\\Users\\USER\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\\python.exe\"\nnpm error gyp info find VS using VS2022 (17.14.36212.18) found at:\nnpm error gyp info find VS \"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\"\nnpm error gyp info find VS run with --verbose for detailed information\nnpm error gyp info spawn C:\\Users\\USER\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\\python.exe\nnpm error gyp info spawn args [\nnpm error gyp info spawn args 'C:\\\\Users\\\\USER\\\\AppData\\\\Local\\\\nvm\\\\v22.16.0\\\\node_modules\\\\npm\\\\node_modules\\\\node-gyp\\\\gyp\\\\gyp_main.py',\nnpm error gyp info spawn args 'binding.gyp',\nnpm error gyp info spawn args '-f',\nnpm error gyp info spawn args 'msvs',\nnpm error gyp info spawn args '-I',\nnpm error gyp info spawn args 'C:\\\\Users\\\\USER\\\\AppData\\\\Roaming\\\\npm\\\\node_modules\\\\code-server\\\\node_modules\\\\argon2\\\\build\\\\config.gypi',\nnpm error gyp info spawn args '-I',\nnpm error gyp info spawn args 'C:\\\\Users\\\\USER\\\\AppData\\\\Local\\\\nvm\\\\v22.16.0\\\\node_modules\\\\npm\\\\node_modules\\\\node-gyp\\\\addon.gypi',\nnpm error gyp info spawn args '-I',\nnpm error gyp info spawn args 'C:\\\\Users\\\\USER\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\22.16.0\\\\include\\\\node\\\\common.gypi',\nnpm error gyp info spawn args '-Dlibrary=shared_library',\nnpm error gyp info spawn args '-Dvisibility=default',\nnpm error gyp info spawn args '-Dnode_root_dir=C:\\\\Users\\\\USER\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\22.16.0',\nnpm error gyp info spawn args '-Dnode_gyp_dir=C:\\\\Users\\\\USER\\\\AppData\\\\Local\\\\nvm\\\\v22.16.0\\\\node_modules\\\\npm\\\\node_modules\\\\node-gyp',\nnpm error gyp info spawn args '-Dnode_lib_file=C:\\\\\\\\Users\\\\\\\\USER\\\\\\\\AppData\\\\\\\\Local\\\\\\\\node-gyp\\\\\\\\Cache\\\\\\\\22.16.0\\\\\\\\\u003c(target_arch)\\\\\\\\node.lib',\nnpm error gyp info spawn args '-Dmodule_root_dir=C:\\\\Users\\\\USER\\\\AppData\\\\Roaming\\\\npm\\\\node_modules\\\\code-server\\\\node_modules\\\\argon2',\nnpm error gyp info spawn args '-Dnode_engine=v8',\nnpm error gyp info spawn args '--depth=.',\nnpm error gyp info spawn args '--no-parallel',\nnpm error gyp info spawn args '--generator-output',\nnpm error gyp info spawn args 'C:\\\\Users\\\\USER\\\\AppData\\\\Roaming\\\\npm\\\\node_modules\\\\code-server\\\\node_modules\\\\argon2\\\\build',\nnpm error gyp info spawn args '-Goutput_dir=.'\nnpm error gyp info spawn args ]\nnpm error gyp: Undefined variable module_name in binding.gyp while trying to load binding.gyp\nnpm error gyp ERR! configure error\nnpm error gyp ERR! stack Error: `gyp` failed with exit code: 1\nnpm error gyp ERR! stack at ChildProcess.\u003canonymous> (C:\\Users\\USER\\AppData\\Local\\nvm\\v22.16.0\\node_modules\\npm\\node_modules\\node-gyp\\lib\\configure.js:317:18)\nnpm error gyp ERR! stack at ChildProcess.emit (node:events:518:28)\nnpm error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:293:12)\nnpm error gyp ERR! System Windows_NT 10.0.22000\nnpm error gyp ERR! command \"C:\\\\nvm4w\\\\nodejs\\\\node.exe\" \"C:\\\\Users\\\\USER\\\\AppData\\\\Local\\\\nvm\\\\v22.16.0\\\\node_modules\\\\npm\\\\node_modules\\\\node-gyp\\\\bin\\\\node-gyp.js\" \"rebuild\"\nnpm error gyp ERR! cwd C:\\Users\\USER\\AppData\\Roaming\\npm\\node_modules\\code-server\\node_modules\\argon2\nnpm error gyp ERR! node -v v22.16.0\nnpm error gyp ERR! node-gyp -v v11.0.0\nnpm error gyp ERR! not ok\nnpm error A complete log of this run can be found in: C:\\Users\\USER\\AppData\\Local\\npm-cache\\_logs\\2025-06-18T19_53_29_020Z-debug-0.log\n\n### Logs\n\n```shell\n\n```\n\n### Screenshot/Video\n\n_No response_\n\n### Does this bug reproduce in native VS Code?\n\nNo, this works as expected in native VS Code\n\n### Does this bug reproduce in GitHub Codespaces?\n\nYes, this is also broken in GitHub Codespaces\n\n### Are you accessing code-server over a secure context?\n\n- [x] I am using a secure context.\n\n### Notes\n\n_No response_","author":{"url":"https://github.com/JamesWan123","@type":"Person","name":"JamesWan123"},"datePublished":"2025-06-18T19:57:11Z","url":"https://github.com/coder/code-server/issues/7380"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:20999f92-c11a-4684-81b7-2ba0e48d0b50 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DD7E:1DC4CC:96EEF0:C97E7A:6B01B7E9 |
| html-safe-nonce | 12801d5f8a975143769765541aee9282edcf4151b5c1b952c5045d351e86237e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERDdFOjFEQzRDQzo5NkVFRjA6Qzk3RTdBOjZCMDFCN0U5IiwidmlzaXRvcl9pZCI6IjExMDQ4Mjc3NTU0MDY2Njk4MDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 39a425a3c8b2d32e12c6acf06507bf0e970bbb3b72c5954bde8694282131ac1a |
| hovercard-subject-tag | issue:3158012098 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/code-server/7380/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ca867bc62445d98d7bc22cb4d9b9c34c0936f83d0a5cea5624a239355b94cd9e/coder/code-server/issues/7380 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ca867bc62445d98d7bc22cb4d9b9c34c0936f83d0a5cea5624a239355b94cd9e/coder/code-server/issues/7380 |
| og:image:alt | Is there an existing issue for this? I have searched the existing issues OS/Web Information Local OS: Windows Steps to Reproduce Install the dependencies of VS2022 and npm run npm i code-server -g ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JamesWan123 |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/coder/code-server git https://github.com/coder/code-server.git |
| octolytics-dimension-user_id | 95932066 |
| octolytics-dimension-user_login | coder |
| octolytics-dimension-repository_id | 172953845 |
| octolytics-dimension-repository_nwo | coder/code-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 172953845 |
| octolytics-dimension-repository_network_root_nwo | coder/code-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width