You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error: Could not load the "sharp" module using the win32-x64 runtime #287
Just upgraded copilot CLI and now copilot won't start. This is the error message:
> copilot --version
C:\Users\damian\AppData\Roaming\npm\node_modules\@github\copilot\node_modules\sharp\lib\sharp.js:121
throw new Error(help.join('\n'));
^
Error: Could not load the "sharp" module using the win32-x64 runtime
Possible solutions:
- Ensure optional dependencies can be installed:
npm install --include=optional sharp
- Ensure your package manager supports multi-platform installation:
See https://sharp.pixelplumbing.com/install#cross-platform
- Add platform-specific dependencies:
npm install --os=win32 --cpu=x64 sharp
- Consult the installation documentation:
See https://sharp.pixelplumbing.com/install
at Object.<anonymous> (C:\Users\damian\AppData\Roaming\npm\node_modules\@github\copilot\node_modules\sharp\lib\sharp.js:121:9)
at Module._compile (node:internal/modules/cjs/loader:1706:14)
at Object..js (node:internal/modules/cjs/loader:1839:10)
at Module.load (node:internal/modules/cjs/loader:1441:32)
at Function._load (node:internal/modules/cjs/loader:1263:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:237:24)
at Module.require (node:internal/modules/cjs/loader:1463:12)
at require (node:internal/modules/helpers:147:16)
at Object.<anonymous> (C:\Users\damian\AppData\Roaming\npm\node_modules\@github\copilot\node_modules\sharp\lib\constructor.js:10:1)
Node.js v22.20.0
None of the suggested solutions made any difference.
$ npx @github/copilot@latest
/Users/samir/.npm/_npx/ffc285342cad15b4/node_modules/sharp/lib/sharp.js:121
throw new Error(help.join('\n'));
^
Error: Could not load the "sharp" module using the darwin-arm64 runtime
Possible solutions:
- Ensure optional dependencies can be installed:
npm install --include=optional sharp
- Ensure your package manager supports multi-platform installation:
See https://sharp.pixelplumbing.com/install#cross-platform
- Add platform-specific dependencies:
npm install --os=darwin --cpu=arm64 sharp
- Consult the installation documentation:
See https://sharp.pixelplumbing.com/install
at Object.<anonymous> (/Users/samir/.npm/_npx/ffc285342cad15b4/node_modules/sharp/lib/sharp.js:121:9)
at Module._compile (node:internal/modules/cjs/loader:1706:14)
at Object..js (node:internal/modules/cjs/loader:1839:10)
at Module.load (node:internal/modules/cjs/loader:1441:32)
at Function._load (node:internal/modules/cjs/loader:1263:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:237:24)
at Module.require (node:internal/modules/cjs/loader:1463:12)
at require (node:internal/modules/helpers:147:16)
at Object.<anonymous> (/Users/samir/.npm/_npx/ffc285342cad15b4/node_modules/sharp/lib/constructor.js:10:1)
Node.js v22.20.0
I tried locally from 0.0.337 to 0.0.341, and all of them (at least for me) seem to have the issue:
[0.00s] [spawned process with pid 1047540, preparation took 0.00s]
[0.52s] /home/brioche-runner-71f728aec395f8f6136df3e9a8b6e9d708105d19cb0bca66b9457121b48b33d6/.local/share/brioche/locals/aa76cbae48acf9a7afe19d7f4491a901bfb01c3602e944236bee4565aaa7fcf6/lib/node_modules/@github/copilot/node_modules/sharp/lib/sharp.js:121
[0.52s] throw new Error(help.join('\n'));
[0.52s] ^
[0.52s]
[0.52s] Error: Could not load the "sharp" module using the linux-arm64 runtime
[0.52s] ERR_DLOPEN_FAILED: libresolv.so.2: cannot open shared object file: No such file or directory
[0.52s] Possible solutions:
[0.52s] - Ensure optional dependencies can be installed:
[0.52s] npm install --include=optional sharp
[0.52s] - Ensure your package manager supports multi-platform installation:
[0.52s] See https://sharp.pixelplumbing.com/install#cross-platform
[0.52s] - Add platform-specific dependencies:
[0.52s] npm install --os=linux --cpu=arm64 sharp
[0.52s] - Consult the installation documentation:
[0.52s] See https://sharp.pixelplumbing.com/install
[0.52s] at Object.<anonymous> (/home/brioche-runner-71f728aec395f8f6136df3e9a8b6e9d708105d19cb0bca66b9457121b48b33d6/.local/share/brioche/locals/aa76cbae48acf9a7afe19d7f4491a901bfb01c3602e944236bee4565aaa7fcf6/lib/node_modules/@github/copilot/node_modules/sharp/lib/sharp.js:121:9)
[0.52s] at Module._compile (node:internal/modules/cjs/loader:1760:14)
[0.52s] at Object..js (node:internal/modules/cjs/loader:1893:10)
[0.52s] at Module.load (node:internal/modules/cjs/loader:1480:32)
[0.52s] at Module._load (node:internal/modules/cjs/loader:1299:12)
[0.52s] at TracingChannel.traceSync (node:diagnostics_channel:328:14)
[0.52s] at wrapModuleLoad (node:internal/modules/cjs/loader:244:24)
[0.52s] at Module.require (node:internal/modules/cjs/loader:1503:12)
[0.52s] at require (node:internal/modules/helpers:152:16)
[0.52s] at Object.<anonymous> (/home/brioche-runner-71f728aec395f8f6136df3e9a8b6e9d708105d19cb0bca66b9457121b48b33d6/.local/share/brioche/locals/aa76cbae48acf9a7afe19d7f4491a901bfb01c3602e944236bee4565aaa7fcf6/lib/node_modules/@github/copilot/node_modules/sharp/lib/constructor.js:10:1)
[0.52s]
[0.52s] Node.js v24.9.0
[0.54s] [process exited with code 1]
I also tested locally with 0.0.335 and 0.0.336, and both (this time) are working.
$ npx @github/copilot@0.0.350-7
Need to install the following packages:
@github/copilot@0.0.350-7
Ok to proceed? (y) y
Welcome to GitHub Copilot CLI
Version 0.0.350-7 · Commit 8169b5c
Copilot can write, test and debug code right from your terminal. Describe a task to get started or enter ? for help. Copilot uses AI, check for mistakes.
● Connected to GitHub MCP Server
● Logged in as user: ...
Activity
ns-sjorgedeaguiar commentedon Oct 13, 2025
Seeing the same on M1 macOS:
damianh commentedon Oct 13, 2025
I downgraded to
0.0.328which works again to unblock me.ns-sjorgedeaguiar commentedon Oct 13, 2025
You mean
0.0.338right? That one works for me too. It seems that this was a problem introduced with0.0.339(most recent version)jaudiger commentedon Oct 15, 2025
I tried locally from
0.0.337to0.0.341, and all of them (at least for me) seem to have the issue:I also tested locally with
0.0.335and0.0.336, and both (this time) are working.RyanHecht commentedon Oct 17, 2025
Hey folks -- we're working on bundling sharp to unblock those of you who get stuck here!
jaudiger commentedon Oct 17, 2025
Thanks @RyanHecht, if you have a fix let me know, I could also validate it on my side.
devm33 commentedon Oct 23, 2025
👋 Please try updating to the latest prerelease as we have reworked how the modules are loaded
or
jaudiger commentedon Oct 23, 2025
I just finished to test the version
0.0.350-7, and here is the output:Details
Same kind of error, I think.
ns-sjorgedeaguiar commentedon Oct 23, 2025
It worked for me on macOS:
robertlincoln commentedon Oct 23, 2025
This:
npm i -g @github/copilot@0.0.350-7Worked for me on native windows.