Repository navigation
Error: Could not load the "sharp" module using the win32-x64 runtime #287
Description
Activity
Seeing the same on M1 macOS:
$ 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.0Reacted by Damian Hickey and PWZERI downgraded to
0.0.328which works again to unblock me.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)I tried locally from
0.0.337to0.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.335and0.0.336, and both (this time) are working.Hey folks -- we're working on bundling sharp to unblock those of you who get stuck here!
Reacted by Jérémy Audiger and Damian HickeyThanks @RyanHecht, if you have a fix let me know, I could also validate it on my side.
👋 Please try updating to the latest prerelease as we have reworked how the modules are loaded
npm i -g @github/copilot@0.0.350-7or
npm i -g @github/copilot@prereleaseI just finished to test the version
0.0.350-7, and here is the output:Details
[0.00s] [spawned process with pid 1759666, preparation took 0.00s] [0.29s] file:///home/brioche-runner-407fffb04f6da7002216c345dbb3165e6d1f9aef1757ffb44033a821351d6ef2/.local/share/brioche/locals/3564a07b7dbeed9b03fa3519acb24c64c3bfd781abf0de5c2962d6546b789f11/lib/node_modules/@github/copilot/index.js:575 [0.29s] `&&(t.content=t.content.slice(1))),ECt(t,l),(l.sections===!0||typeof l.section=="function")&&hln(t,l.section),t}og.engines=gln;og.stringify=function(t,e,l){return typeof t=="string"&&(t=og(t,l)),Aln(t,e,l)};og.read=function(t,e){let l=pln.readFileSync(t,"utf8"),n=og(l,e);return n.path=t,n};og.test=function(t,e){return RCt.startsWith(t,qTe(e).delimiters[0])};og.language=function(t,e){let n=qTe(e).delimiters[0];og.test(t)&&(t=t.slice(n.length));let r=t.slice(0,t.search(/\r?\n/));return{raw:r,name:r?r.trim():""}};og.cache={};og.clearCache=function(){og.cache={}};YCt.exports=og});var PV=F((_wa,PCt)=>{"use strict";c();var zCt=function(t){return typeof t<"u"&&t!==null},ern=function(t){return typeof t=="object"},trn=function(t){return Object.prototype.toString.call(t)==="[object Object]"},lrn=function(t){return typeof t=="function"},nrn=function(t){return typeof t=="boolean"},rrn=function(t){return t instanceof Buffer},arn=function(t){if(zCt(t))switch(t.constructor){case Uint8Array:case Uint8ClampedArray:case Int8Array:case Uint16Array:case Int16Array:case Uint32Array:case Int32Array:case Float32Array:case Float64Array:return!0}return!1},Irn=function(t){return t instanceof ArrayBuffer},srn=function(t){return typeof t=="string"&&t.length>0},orn=function(t){return typeof t=="number"&&!Number.isNaN(t)},irn=function(t){return Number.isInteger(t)},crn=function(t,e,l){return t>=e&&t<=l},drn=function(t,e){return e.includes(t)},urn=function(t,e,l){return new Error(`Expected ${e} for ${t} but received ${l} of type ${typeof l}`)},mrn=function(t,e){return e.message=t.message,e};PCt.exports={defined:zCt,object:ern,plainObject:trn,fn:lrn,bool:nrn,buffer:rrn,typedArray:arn,arrayBuffer:Irn,string:srn,number:orn,integer:irn,inRange:crn,inArray:drn,invalidParameterError:urn,nativeError:mrn}});var qCt=F((zwa,KCt)=>{"use strict";c();var jCt=()=>process.platform==="linux",QEe=null,brn=()=>{if(!QEe)if(jCt()&&process.report){let t=process.report.excludeNetwork;process.report.excludeNetwork=!0,QEe=process.report.getReport(),process.report.excludeNetwork=t}else QEe={};return QEe};KCt.exports={isLinux:jCt,getReport:brn}});var tvt=F((jwa,evt)=>{"use strict";c();var $Ct=le("fs"),Grn="/usr/bin/ldd",prn=t=>$Ct.readFileSync(t,"utf-8"),hrn=t=>new Promise((e,l)=>{$Ct.readFile(t,"utf-8",(n,r)=>{n?l(n):e(r)})});evt.exports={LDD_PATH:Grn,readFileSync:prn,readFile:hrn}});var CEe=F((qwa,Avt)=>{"use strict";c();var nvt=le("child_process"),{isLinux:I6,getReport:rvt}=qCt(),{LDD_PATH:FEe,readFile:avt,readFileSync:Ivt}=tvt(),jV,KV,svt="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",T4="",ovt=()=>T4||new Promise(t=>{nvt.exec(svt,(e,l)=>{T4=e?" ":l,t(T4)})}),ivt=()=>{if(!T4)try{T4=nvt.execSync(svt,{encoding:"utf8"})}catch{T4=" "}return T4},U4="glibc",cvt=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,a6="musl",Arn=t=>t.includes("libc.musl-")||t.includes("ld-musl-"),dvt=()=>{let t=rvt();return t.header&&t.header.glibcVersionRuntime?U4:Array.isArray(t.sharedObjects)&&t.sharedObjects.some(Arn)?a6:null},uvt=t=>{let[e,l]=t.split(/[\r\n]+/);return e&&e.includes(U4)?U4:l&&l.includes(a6)?a6:null},mvt=t=>t.includes("musl")?a6:t.includes("GNU C Library")?U4:null,grn=async()=>{if(jV!==void 0)return jV;jV=null;try{let t=await avt(FEe);jV=mvt(t)}catch{}return jV},Zrn=()=>{if(jV!==void 0)return jV;jV=null;try{let t=Ivt(FEe);jV=mvt(t)}catch{}return jV},bvt=async()=>{let t=null;if(I6()&&(t=await grn(),t||(t=dvt()),!t)){let e=await ovt();t=uvt(e)}return t},Gvt=()=>{let t=null;if(I6()&&(t=Zrn(),t||(t=dvt()),!t)){let e=ivt();t=uvt(e)}return t},Nrn=async()=>I6()&&await bvt()!==U4,Wrn=()=>I6()&&Gvt()!==U4,yrn=async()=>{if(KV!==void 0)return KV;KV=null;try{let e=(await avt(FEe)).match(cvt);e&&(KV=e[1])}catch{}return KV},Ern=()=>{if(KV!==void 0)return KV;KV=null;try{let e=Ivt(FEe).match(cvt);e&&(KV=e[1])}catch{}return KV},pvt=()=>{let t=rvt();return t.header&&t.header.glibcVersionRuntime?t.header.glibcVersionRuntime:null},lvt=t=>t.trim().split(/\s+/)[1],hvt=t=>{let[e,l,n]=t.split(/[\r\n]+/);return e&&e.includes(U4)?lvt(e):l&&n&&l.includes(a6)?lvt(n):null},Rrn=async()=>{let t=null;if(I6()&&(t=await yrn(),t||(t=pvt()),!t)){let e=await ovt();t=hvt(e)}return t},Yrn=()=>{let t=null;if(I6()&&(t=Ern(),t||(t=pvt()),!t)){let e=ivt();t=hvt(e)}return t};Avt.exports={GLIBC:U4,MUSL:a6,family:bvt,familySync:Gvt,isNonGlibcLinux:Nrn,isNonGlibcLinuxSync:Wrn,version:Rrn,versionSync:Yrn}});var Xse=F((eQa,gvt)=>{"use strict";c();var Vrn=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};gvt.exports=Vrn});var kse=F((lQa,Zvt)=>{"use strict";c();var wrn="2.0.0",Qrn=Number.MAX_SAFE_INTEGER||9007199254740991,Frn=16,Crn=250,vrn=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Zvt.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Frn,MAX_SAFE_BUILD_LENGTH:Crn,MAX_SAFE_INTEGER:Qrn,RELEASE_TYPES:vrn,SEMVER_SPEC_VERSION:wrn,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var s6=F((qV,Nvt)=>{"use strict";c();var{MAX_SAFE_COMPONENT_LENGTH:nUe,MAX_SAFE_BUILD_LENGTH:frn,MAX_LENGTH:Hrn}=kse(),Xrn=Xse();qV=Nvt.exports={};var krn=qV.re=[],Lrn=qV.safeRe=[],Un=qV.src=[],Jrn=qV.safeSrc=[],Mn=qV.t={},xrn=0,rUe="[a-zA-Z0-9-]",Srn=[["\\s",1],["\\d",Hrn],[rUe,frn]],Brn=t=>{for(let[e,l]of Srn)t=t.split(`${e}*`).join(`${e}{0,${l}}`).split(`${e}+`).join(`${e}{1,${l}}`);return t},Ua=(t,e,l)=>{let n=Brn(e),r=xrn++;Xrn(t,r,e),Mn[t]=r,Un[r]=e,Jrn[r]=n,krn[r]=new RegExp(e,l?"g":void 0),Lrn[r]=new RegExp(n,l?"g":void 0)};Ua("NUMERICIDENTIFIER","0|[1-9]\\d*");Ua("NUMERICIDENTIFIERLOOSE","\\d+");Ua("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${rUe}*`);Ua("MAINVERSION",`(${Un[Mn.NUMERICIDENTIFIER]})\\.(${Un[Mn.NUMERICIDENTIFIER]})\\.(${Un[Mn.NUMERICIDENTIFIER]})`);Ua("MAINVERSIONLOOSE",`(${Un[Mn.NUMERICIDENTIFIERLOOSE]})\\.(${Un[Mn.NUMERICIDENTIFIERLOOSE]})\\.(${Un[Mn.NUMERICIDENTIFIERLOOSE]})`);Ua("PRERELEASEIDENTIFIER",`(?:${Un[Mn.NONNUMERICIDENTIFIER]}|${Un[Mn.NUMERICIDENTIFIER]})`);Ua("PRERELEASEIDENTIFIERLOOSE",`(?:${Un[Mn.NONNUMERICIDENTIFIER]}|${Un[Mn.NUMERICIDENTIFIERLOOSE]})`);Ua("PRERELEASE",`(?:-(${Un[Mn.PRERELEASEIDENTIFIER]}(?:\\.${Un[Mn.PRERELEASEIDENTIFIER]})*))`);Ua("PRERELEASELOOSE",`(?:-?(${Un[Mn.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${Un[Mn.PRERELEASEIDENTIFIERLOOSE]})*))`);Ua("BUILDIDENTIFIER",`${rUe}+`);Ua("BUILD",`(?:\\+(${Un[Mn.BUILDIDENTIFIER]}(?:\\.${Un[Mn.BUILDIDENTIFIER]})*))`);Ua("FULLPLAIN",`v?${Un[Mn.MAINVERSION]}${Un[Mn.PRERELEASE]}?${Un[Mn.BUILD]}?`);Ua("FULL",`^${Un[Mn.FULLPLAIN]}$`);Ua("LOOSEPLAIN",`[v=\\s]*${Un[Mn.MAINVERSIONLOOSE]}${Un[Mn.PRERELEASELOOSE]}?${Un[Mn.BUILD]}?`);Ua("LOOSE",`^${Un[Mn.LOOSEPLAIN]}$`);Ua("GTLT","((?:<|>)?=?)");Ua("XRANGEIDENTIFIERLOOSE",`${Un[Mn.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Ua("XRANGEIDENTIFIER",`${Un[Mn.NUMERICIDENTIFIER]}|x|X|\\*`);Ua("XRANGEPLAIN",`[v=\\s]*(${Un[Mn.XRANGEIDENTIFIER]})(?:\\.(${Un[Mn.XRANGEIDENTIFIER]})(?:\\.(${Un[Mn.XRANGEIDENTIFIER]})(?:${Un[Mn.PRERELEASE]})?${Un[Mn.BUILD]}?)?)?`);Ua("XRANGEPLAINLOOSE",`[v=\\s]*(${Un[Mn.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Un[Mn.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Un[Mn.XRANGEIDENTIFIERLOOSE]})(?:${Un[Mn.PRERELEASELOOSE]})?${Un[Mn.BUILD]}?)?)?`);Ua("XRANGE",`^${Un[Mn.GTLT]}\\s*${Un[Mn.XRANGEPLAIN]}$`);Ua("XRANGELOOSE",`^${Un[Mn.GTLT]}\\s*${Un[Mn.XRANGEPLAINLOOSE]}$`);Ua("COERCEPLAIN",`(^|[^\\d])(\\d{1,${nUe}})(?:\\.(\\d{1,${nUe}}))?(?:\\.(\\d{1,${nUe}}))?`);Ua("COERCE",`${Un[Mn.COERCEPLAIN]}(?:$|[^\\d])`);Ua("COERCEFULL",Un[Mn.COERCEPLAIN]+`(?:${Un[Mn.PRERELEASE]})?(?:${Un[Mn.BUILD]})?(?:$|[^\\d])`);Ua("COERCERTL",Un[Mn.COERCE],!0);Ua("COERCERTLFULL",Un[Mn.COERCEFULL],!0);Ua("LONETILDE","(?:~>?)");Ua("TILDETRIM",`(\\s*)${Un[Mn.LONETILDE]}\\s+`,!0);qV.tildeTrimReplace="$1~";Ua("TILDE",`^${Un[Mn.LONETILDE]}${Un[Mn.XRANGEPLAIN]}$`);Ua("TILDELOOSE",`^${Un[Mn.LONETILDE]}${Un[Mn.XRANGEPLAINLOOSE]}$`);Ua("LONECARET","(?:\\^)");Ua("CARETTRIM",`(\\s*)${Un[Mn.LONECARET]}\\s+`,!0);qV.caretTrimReplace="$1^";Ua("CARET",`^${Un[Mn.LONECARET]}${Un[Mn.XRANGEPLAIN]}$`);Ua("CARETLOOSE",`^${Un[Mn.LONECARET]}${Un[Mn.XRANGEPLAINLOOSE]}$`);Ua("COMPARATORLOOSE",`^${Un[Mn.GTLT]}\\s*(${Un[Mn.LOOSEPLAIN]})$|^$`);Ua("COMPARATOR",`^${Un[Mn.GTLT]}\\s*(${Un[Mn.FULLPLAIN]})$|^$`);Ua("COMPARATORTRIM",`(\\s*)${Un[Mn.GTLT]}\\s*(${Un[Mn.LOOSEPLAIN]}|${Un[Mn.XRANGEPLAIN]})`,!0);qV.comparatorTrimReplace="$1$2$3";Ua("HYPHENRANGE",`^\\s*(${Un[Mn.XRANGEPLAIN]})\\s+-\\s+(${Un[Mn.XRANGEPLAIN]})\\s*$`);Ua("HYPHENRANGELOOSE",`^\\s*(${Un[Mn.XRANGEPLAINLOOSE]})\\s+-\\s+(${Un[Mn.XRANGEPLAINLOOSE]})\\s*$`);Ua("STAR","(<|>)?=?\\s*\\*");Ua("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Ua("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var vEe=F((aQa,Wvt)=>{"use strict";c();var Orn=Object.freeze({loose:!0}),Trn=Object.freeze({}),Urn=t=>t?typeof t!="object"?Orn:t:Trn;Wvt.exports=Urn});var aUe=F((sQa,Rvt)=>{"use strict";c();var yvt=/^[0-9]+$/,Evt=(t,e)=>{let l=yvt.test(t),n=yvt.test(e);return l&&n&&(t=+t,e=+e),t===e?0:l&&!n?-1:n&&!l?1:t<e?-1:1},Mrn=(t,e)=>Evt(e,t);Rvt.exports={compareIdentifiers:Evt,rcompareIdentifiers:Mrn}});var Qh=F((iQa,Vvt)=>{"use strict";c();var fEe=Xse(),{MAX_LENGTH:Yvt,MAX_SAFE_INTEGER:HEe}=kse(),{safeRe:XEe,t:kEe}=s6(),_rn=vEe(),{compareIdentifiers:o6}=aUe(),IUe=class t{constructor(e,l){if(l=_rn(l),e instanceof t){if(e.loose===!!l.loose&&e.includePrerelease===!!l.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Yvt)throw new TypeError(`version is longer than ${Yvt} characters`);fEe("SemVer",e,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;let n=e.trim().match(l.loose?XEe[kEe.LOOSE]:XEe[kEe.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>HEe||this.major<0)throw new TypeError("Invalid major version");if(this.minor>HEe||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>HEe||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(r=>{if(/^[0-9]+$/.test(r)){let a=+r;if(a>=0&&a<HEe)return a}return r}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(fEe("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),o6(this.major,e.major)||o6(this.minor,e.minor)||o6(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let l=0;do{let n=this.prerelease[l],r=e.prerelease[l];if(fEe("prerelease compare",l,n,r),n===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(n===void 0)return-1;if(n===r)continue;return o6(n,r)}while(++l)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let l=0;do{let n=this.build[l],r=e.build[l];if(fEe("build compare",l,n,r),n===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(n===void 0)return-1;if(n===r)continue;return o6(n,r)}while(++l)}inc(e,l,n){if(e.startsWith("pre")){if(!l&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(l){let r=`-${l}`.match(this.options.loose?XEe[kEe.PRERELEASELOOSE]:XEe[kEe.PRERELEASE]);if(!r||r[1]!==l)throw new Error(`invalid identifier: ${l}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",l,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",l,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",l,n),this.inc("pre",l,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",l,n),this.inc("pre",l,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let r=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[r];else{let a=this.prerelease.length;for(;--a>=0;)typeof this.prerelease[a]=="number"&&(this.prerelease[a]++,a=-2);if(a===-1){if(l===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(r)}}if(l){let a=[l,r];n===!1&&(a=[l]),o6(this.prerelease[0],l)===0?isNaN(this.prerelease[1])&&(this.prerelease=a):this.prerelease=a}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Vvt.exports=IUe});var EB=F((dQa,Qvt)=>{"use strict";c();var wvt=Qh(),Drn=(t,e,l=!1)=>{if(t instanceof wvt)return t;try{return new wvt(t,e)}catch(n){if(!l)return null;throw n}};Qvt.exports=Drn});var sUe=F((mQa,Fvt)=>{"use strict";c();var zrn=Qh(),Prn=EB(),{safeRe:LEe,t:JEe}=s6(),jrn=(t,e)=>{if(t instanceof zrn)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let l=null;if(!e.rtl)l=t.match(e.includePrerelease?LEe[JEe.COERCEFULL]:LEe[JEe.COERCE]);else{let o=e.includePrerelease?LEe[JEe.COERCERTLFULL]:LEe[JEe.COERCERTL],d;for(;(d=o.exec(t))&&(!l||l.index+l[0].length!==t.length);)(!l||d.index+d[0].length!==l.index+l[0].length)&&(l=d),o.lastIndex=d.index+d[1].length+d[2].length;o.lastIndex=-1}if(l===null)return null;let n=l[2],r=l[3]||"0",a=l[4]||"0",I=e.includePrerelease&&l[5]?`-${l[5]}`:"",s=e.includePrerelease&&l[6]?`+${l[6]}`:"";return Prn(`${n}.${r}.${a}${I}${s}`,e)};Fvt.exports=jrn});var zE=F((GQa,vvt)=>{"use strict";c();var Cvt=Qh(),Krn=(t,e,l)=>new Cvt(t,l).compare(new Cvt(e,l));vvt.exports=Krn});var Lse=F((hQa,fvt)=>{"use strict";c();var qrn=zE(),$rn=(t,e,l)=>qrn(t,e,l)>=0;fvt.exports=$rn});var Xvt=F((gQa,Hvt)=>{"use strict";c();var oUe=class{constructor(){this.max=1e3,this.map=new Map}get(e){let l=this.map.get(e);if(l!==void 0)return this.map.delete(e),this.map.set(e,l),l}delete(e){return this.map.delete(e)}set(e,l){if(!this.delete(e)&&l!==void 0){if(this.map.size>=this.max){let r=this.map.keys().next().value;this.delete(r)}this.map.set(e,l)}return this}};Hvt.exports=oUe});var iUe=F((NQa,kvt)=>{"use strict";c();var ean=zE(),tan=(t,e,l)=>ean(t,e,l)===0;kvt.exports=tan});var cUe=F((yQa,Lvt)=>{"use strict";c();var lan=zE(),nan=(t,e,l)=>lan(t,e,l)!==0;Lvt.exports=nan});var i6=F((RQa,Jvt)=>{"use strict";c();var ran=zE(),aan=(t,e,l)=>ran(t,e,l)>0;Jvt.exports=aan});var xEe=F((VQa,xvt)=>{"use strict";c();var Ian=zE(),san=(t,e,l)=>Ian(t,e,l)<0;xvt.exports=san});var SEe=F((QQa,Svt)=>{"use strict";c();var oan=zE(),ian=(t,e,l)=>oan(t,e,l)<=0;Svt.exports=ian});var dUe=F((CQa,Bvt)=>{"use strict";c();var can=iUe(),dan=cUe(),uan=i6(),man=Lse(),ban=xEe(),Gan=SEe(),pan=(t,e,l,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof l=="object"&&(l=l.version),t===l;case"!==":return typeof t=="object"&&(t=t.version),typeof l=="object"&&(l=l.version),t!==l;case"":case"=":case"==":return can(t,l,n);case"!=":return dan(t,l,n);case">":return uan(t,l,n);case">=":return man(t,l,n);case"<":return ban(t,l,n);case"<=":return Gan(t,l,n);default:throw new TypeError(`Invalid operator: ${e}`)}};Bvt.exports=pan});var xse=F((fQa,Dvt)=>{"use strict";c();var Jse=Symbol("SemVer ANY"),bUe=class t{static get ANY(){return Jse}constructor(e,l){if(l=Ovt(l),e instanceof t){if(e.loose===!!l.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),mUe("comparator",e,l),this.options=l,this.loose=!!l.loose,this.parse(e),this.semver===Jse?this.value="":this.value=this.operator+this.semver.version,mUe("comp",this)}parse(e){let l=this.options.loose?Tvt[Uvt.COMPARATORLOOSE]:Tvt[Uvt.COMPARATOR],n=e.match(l);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Mvt(n[2],this.options.loose):this.semver=Jse}toString(){return this.value}test(e){if(mUe("Comparator.test",e,this.options.loose),this.semver===Jse||e===Jse)return!0;if(typeof e=="string")try{e=new Mvt(e,this.options)}catch{return!1}return uUe(e,this.operator,this.semver,this.options)}intersects(e,l){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new _vt(e.value,l).test(this.value):e.operator===""?e.value===""?!0:new _vt(this.value,l).test(e.semver):(l=Ovt(l),l.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!l.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||uUe(this.semver,"<",e.semver,l)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||uUe(this.semver,">",e.semver,l)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Dvt.exports=bUe;var Ovt=vEe(),{safeRe:Tvt,t:Uvt}=s6(),uUe=dUe(),mUe=Xse(),Mvt=Qh(),_vt=PE()});var PE=F((XQa,Kvt)=>{"use strict";c();var han=/\s+/g,GUe=class t{constructor(e,l){if(l=gan(l),e instanceof t)return e.loose===!!l.loose&&e.includePrerelease===!!l.includePrerelease?e:new t(e.raw,l);if(e instanceof pUe)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease,this.raw=e.trim().replace(han," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(r=>!Pvt(r[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let r of this.set)if(r.length===1&&Yan(r[0])){this.set=[r];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let l=this.set[e];for(let n=0;n<l.length;n++)n>0&&(this.formatted+=" "),this.formatted+=l[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let n=((this.options.includePrerelease&&Ean)|(this.options.loose&&Ran))+":"+e,r=zvt.get(n);if(r)return r;let a=this.options.loose,I=a?UZ[ig.HYPHENRANGELOOSE]:UZ[ig.HYPHENRANGE];e=e.replace(I,kan(this.options.includePrerelease)),Jc("hyphen replace",e),e=e.replace(UZ[ig.COMPARATORTRIM],Nan),Jc("comparator trim",e),e=e.replace(UZ[ig.TILDETRIM],Wan),Jc("tilde trim",e),e=e.replace(UZ[ig.CARETTRIM],yan),Jc("caret trim",e);let s=e.split(" ").map(b=>Van(b,this.options)).join(" ").split(/\s+/).map(b=>Xan(b,this.options));a&&(s=s.filter(b=>(Jc("loose invalid filter",b,this.options),!!b.match(UZ[ig.COMPARATORLOOSE])))),Jc("range list",s);let o=new Map,d=s.map(b=>new pUe(b,this.options));for(let b of d){if(Pvt(b))return[b];o.set(b.value,b)}o.size>1&&o.has("")&&o.delete("");let u=[...o.values()];return zvt.set(n,u),u}intersects(e,l){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(n=>jvt(n,l)&&e.set.some(r=>jvt(r,l)&&n.every(a=>r.every(I=>a.intersects(I,l)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Zan(e,this.options)}catch{return!1}for(let l=0;l<this.set.length;l++)if(Lan(this.set[l],e,this.options))return!0;return!1}};Kvt.exports=GUe;var Aan=Xvt(),zvt=new Aan,gan=vEe(),pUe=xse(),Jc=Xse(),Zan=Qh(),{safeRe:UZ,t:ig,comparatorTrimReplace:Nan,tildeTrimReplace:Wan,caretTrimReplace:yan}=s6(),{FLAG_INCLUDE_PRERELEASE:Ean,FLAG_LOOSE:Ran}=kse(),Pvt=t=>t.value==="<0.0.0-0",Yan=t=>t.value==="",jvt=(t,e)=>{let l=!0,n=t.slice(),r=n.pop();for(;l&&n.length;)l=n.every(a=>r.intersects(a,e)),r=n.pop();return l},Van=(t,e)=>(Jc("comp",t,e),t=Fan(t,e),Jc("caret",t),t=wan(t,e),Jc("tildes",t),t=van(t,e),Jc("xrange",t),t=Han(t,e),Jc("stars",t),t),cg=t=>!t||t.toLowerCase()==="x"||t==="*",wan=(t,e)=>t.trim().split(/\s+/).map(l=>Qan(l,e)).join(" "),Qan=(t,e)=>{let l=e.loose?UZ[ig.TILDELOOSE]:UZ[ig.TILDE];return t.replace(l,(n,r,a,I,s)=>{Jc("tilde",t,n,r,a,I,s);let o;return cg(r)?o="":cg(a)?o=`>=${r}.0.0 <${+r+1}.0.0-0`:cg(I)?o=`>=${r}.${a}.0 <${r}.${+a+1}.0-0`:s?(Jc("replaceTilde pr",s),o=`>=${r}.${a}.${I}-${s} <${r}.${+a+1}.0-0`):o=`>=${r}.${a}.${I} <${r}.${+a+1}.0-0`,Jc("tilde return",o),o})},Fan=(t,e)=>t.trim().split(/\s+/).map(l=>Can(l,e)).join(" "),Can=(t,e)=>{Jc("caret",t,e);let l=e.loose?UZ[ig.CARETLOOSE]:UZ[ig.CARET],n=e.includePrerelease?"-0":"";return t.replace(l,(r,a,I,s,o)=>{Jc("caret",t,r,a,I,s,o);let d;return cg(a)?d="":cg(I)?d=`>=${a}.0.0${n} <${+a+1}.0.0-0`:cg(s)?a==="0"?d=`>=${a}.${I}.0${n} <${a}.${+I+1}.0-0`:d=`>=${a}.${I}.0${n} <${+a+1}.0.0-0`:o?(Jc("replaceCaret pr",o),a==="0"?I==="0"?d=`>=${a}.${I}.${s}-${o} <${a}.${I}.${+s+1}-0`:d=`>=${a}.${I}.${s}-${o} <${a}.${+I+1}.0-0`:d=`>=${a}.${I}.${s}-${o} <${+a+1}.0.0-0`):(Jc("no pr"),a==="0"?I==="0"?d=`>=${a}.${I}.${s}${n} <${a}.${I}.${+s+1}-0`:d=`>=${a}.${I}.${s}${n} <${a}.${+I+1}.0-0`:d=`>=${a}.${I}.${s} <${+a+1}.0.0-0`),Jc("caret return",d),d})},van=(t,e)=>(Jc("replaceXRanges",t,e),t.split(/\s+/).map(l=>fan(l,e)).join(" ")),fan=(t,e)=>{t=t.trim();let l=e.loose?UZ[ig.XRANGELOOSE]:UZ[ig.XRANGE];return t.replace(l,(n,r,a,I,s,o)=>{Jc("xRange",t,n,r,a,I,s,o);let d=cg(a),u=d||cg(I),b=u||cg(s),p=b;return r==="="&&p&&(r=""),o=e.includePrerelease?"-0":"",d?r===">"||r==="<"?n="<0.0.0-0":n="*":r&&p?(u&&(I=0),s=0,r===">"?(r=">=",u?(a=+a+1,I=0,s=0):(I=+I+1,s=0)):r==="<="&&(r="<",u?a=+a+1:I=+I+1),r==="<"&&(o="-0"),n=`${r+a}.${I}.${s}${o}`):u?n=`>=${a}.0.0${o} <${+a+1}.0.0-0`:b&&(n=`>=${a}.${I}.0${o} <${a}.${+I+1}.0-0`),Jc("xRange return",n),n})},Han=(t,e)=>(Jc("replaceStars",t,e),t.trim().replace(UZ[ig.STAR],"")),Xan=(t,e)=>(Jc("replaceGTE0",t,e),t.trim().replace(UZ[e.includePrerelease?ig.GTE0PRE:ig.GTE0],"")),kan=t=>(e,l,n,r,a,I,s,o,d,u,b,p)=>(cg(n)?l="":cg(r)?l=`>=${n}.0.0${t?"-0":""}`:cg(a)?l=`>=${n}.${r}.0${t?"-0":""}`:I?l=`>=${l}`:l=`>=${l}${t?"-0":""}`,cg(d)?o="":cg(u)?o=`<${+d+1}.0.0-0`:cg(b)?o=`<${d}.${+u+1}.0-0`:p?o=`<=${d}.${u}.${b}-${p}`:t?o=`<${d}.${u}.${+b+1}-0`:o=`<=${o}`,`${l} ${o}`.trim()),Lan=(t,e,l)=>{for(let n=0;n<t.length;n++)if(!t[n].test(e))return!1;if(e.prerelease.length&&!l.includePrerelease){for(let n=0;n<t.length;n++)if(Jc(t[n].semver),t[n].semver!==pUe.ANY&&t[n].semver.prerelease.length>0){let r=t[n].semver;if(r.major===e.major&&r.minor===e.minor&&r.patch===e.patch)return!0}return!1}return!0}});var c6=F((LQa,qvt)=>{"use strict";c();var Jan=PE(),xan=(t,e,l)=>{try{e=new Jan(e,l)}catch{return!1}return e.test(t)};qvt.exports=xan});var hUe=F((xQa,San)=>{San.exports={name:"sharp",description:"High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images",version:"0.34.3",author:"Lovell Fuller <npm@lovell.info>",homepage:"https://sharp.pixelplumbing.com",contributors:["Pierre Inglebert <pierre.inglebert@gmail.com>","Jonathan Ong <jonathanrichardong@gmail.com>","Chanon Sajjamanochai <chanon.s@gmail.com>","Juliano Julio <julianojulio@gmail.com>","Daniel Gasienica <daniel@gasienica.ch>","Julian Walker <julian@fiftythree.com>","Amit Pitaru <pitaru.amit@gmail.com>","Brandon Aaron <hello.brandon@aaron.sh>","Andreas Lind <andreas@one.com>","Maurus Cuelenaere <mcuelenaere@gmail.com>","Linus Unneb\xE4ck <linus@folkdatorn.se>","Victor Mateevitsi <mvictoras@gmail.com>","Alaric Holloway <alaric.holloway@gmail.com>","Bernhard K. Weisshuhn <bkw@codingforce.com>","Chris Riley <criley@primedia.com>","David Carley <dacarley@gmail.com>","John Tobin <john@limelightmobileinc.com>","Kenton Gray <kentongray@gmail.com>","Felix B\xFCnemann <Felix.Buenemann@gmail.com>","Samy Al Zahrani <samyalzahrany@gmail.com>","Chintan Thakkar <lemnisk8@gmail.com>","F. Orlando Galashan <frulo@gmx.de>","Kleis Auke Wolthuizen <info@kleisauke.nl>","Matt Hirsch <mhirsch@media.mit.edu>","Matthias Thoemmes <thoemmes@gmail.com>","Patrick Paskaris <patrick@paskaris.gr>","J\xE9r\xE9my Lal <kapouer@melix.org>","Rahul Nanwani <r.nanwani@gmail.com>","Alice Monday <alice0meta@gmail.com>","Kristo Jorgenson <kristo.jorgenson@gmail.com>","YvesBos <yves_bos@outlook.com>","Guy Maliar <guy@tailorbrands.com>","Nicolas Coden <nicolas@ncoden.fr>","Matt Parrish <matt.r.parrish@gmail.com>","Marcel Bretschneider <marcel.bretschneider@gmail.com>","Matthew McEachen <matthew+github@mceachen.org>","Jarda Kot\u011B\u0161ovec <jarda.kotesovec@gmail.com>","Kenric D'Souza <kenric.dsouza@gmail.com>","Oleh Aleinyk <oleg.aleynik@gmail.com>","Marcel Bretschneider <marcel.bretschneider@gmail.com>","Andrea Bianco <andrea.bianco@unibas.ch>","Rik Heywood <rik@rik.org>","Thomas Parisot <hi@oncletom.io>","Nathan Graves <nathanrgraves+github@gmail.com>","Tom Lokhorst <tom@lokhorst.eu>","Espen Hovlandsdal <espen@hovlandsdal.com>","Sylvain Dumont <sylvain.dumont35@gmail.com>","Alun Davies <alun.owain.davies@googlemail.com>","Aidan Hoolachan <ajhoolachan21@gmail.com>","Axel Eirola <axel.eirola@iki.fi>","Freezy <freezy@xbmc.org>","Daiz <taneli.vatanen@gmail.com>","Julian Aubourg <j@ubourg.net>","Keith Belovay <keith@picthrive.com>","Michael B. Klein <mbklein@gmail.com>","Jordan Prudhomme <jordan@raboland.fr>","Ilya Ovdin <iovdin@gmail.com>","Andargor <andargor@yahoo.com>","Paul Neave <paul.neave@gmail.com>","Brendan Kennedy <brenwken@gmail.com>","Brychan Bennett-Odlum <git@brychan.io>","Edward Silverton <e.silverton@gmail.com>","Roman Malieiev <aromaleev@gmail.com>","Tomas Szabo <tomas.szabo@deftomat.com>","Robert O'Rourke <robert@o-rourke.org>","Guillermo Alfonso Varela Chouci\xF1o <guillevch@gmail.com>","Christian Flintrup <chr@gigahost.dk>","Manan Jadhav <manan@motionden.com>","Leon Radley <leon@radley.se>","alza54 <alza54@thiocod.in>","Jacob Smith <jacob@frende.me>","Michael Nutt <michael@nutt.im>","Brad Parham <baparham@gmail.com>","Taneli Vatanen <taneli.vatanen@gmail.com>","Joris Dugu\xE9 <zaruike10@gmail.com>","Chris Banks <christopher.bradley.banks@gmail.com>","Ompal Singh <ompal.hitm09@gmail.com>","Brodan <christopher.hranj@gmail.com>","Ankur Parihar <ankur.github@gmail.com>","Brahim Ait elhaj <brahima@gmail.com>","Mart Jansink <m.jansink@gmail.com>","Lachlan Newman <lachnewman007@gmail.com>","Dennis Beatty <dennis@dcbeatty.com>","Ingvar Stepanyan <me@rreverser.com>","Don Denton <don@happycollision.com>"],scripts:{install:"node install/check.js",clean:"rm -rf src/build/ .nyc_output/ coverage/ test/fixtures/output.*",test:"npm run test-lint && npm run test-unit && npm run test-licensing && npm run test-types","test-lint":"semistandard && cpplint","test-unit":"nyc --reporter=lcov --reporter=text --check-coverage --branches=100 mocha","test-licensing":'license-checker --production --summary --onlyAllow="Apache-2.0;BSD;ISC;LGPL-3.0-or-later;MIT"',"test-leak":"./test/leak/leak.sh","test-types":"tsd","package-from-local-build":"node npm/from-local-build.js","docs-build":"node docs/build.mjs","docs-serve":"cd docs && npm start","docs-publish":"cd docs && npm run build && npx firebase-tools deploy --project pixelplumbing --only hosting:pixelplumbing-sharp"},type:"commonjs",main:"lib/index.js",types:"lib/index.d.ts",files:["install","lib","src/*.{cc,h,gyp}"],repository:{type:"git",url:"git:https://github.com/lovell/sharp.git"},keywords:["jpeg","png","webp","avif","tiff","gif","svg","jp2","dzi","image","resize","thumbnail","crop","embed","libvips","vips"],dependencies:{color:"^4.2.3","detect-libc":"^2.0.4",semver:"^7.7.2"},optionalDependencies:{"@img/sharp-darwin-arm64":"0.34.3","@img/sharp-darwin-x64":"0.34.3","@img/sharp-libvips-darwin-arm64":"1.2.0","@img/sharp-libvips-darwin-x64":"1.2.0","@img/sharp-libvips-linux-arm":"1.2.0","@img/sharp-libvips-linux-arm64":"1.2.0","@img/sharp-libvips-linux-ppc64":"1.2.0","@img/sharp-libvips-linux-s390x":"1.2.0","@img/sharp-libvips-linux-x64":"1.2.0","@img/sharp-libvips-linuxmusl-arm64":"1.2.0","@img/sharp-libvips-linuxmusl-x64":"1.2.0","@img/sharp-linux-arm":"0.34.3","@img/sharp-linux-arm64":"0.34.3","@img/sharp-linux-ppc64":"0.34.3","@img/sharp-linux-s390x":"0.34.3","@img/sharp-linux-x64":"0.34.3","@img/sharp-linuxmusl-arm64":"0.34.3","@img/sharp-linuxmusl-x64":"0.34.3","@img/sharp-wasm32":"0.34.3","@img/sharp-win32-arm64":"0.34.3","@img/sharp-win32-ia32":"0.34.3","@img/sharp-win32-x64":"0.34.3"},devDependencies:{"@emnapi/runtime":"^1.4.4","@img/sharp-libvips-dev":"1.2.0","@img/sharp-libvips-dev-wasm32":"1.2.0","@img/sharp-libvips-win32-arm64":"1.2.0","@img/sharp-libvips-win32-ia32":"1.2.0","@img/sharp-libvips-win32-x64":"1.2.0","@types/node":"*",cc:"^3.0.1",emnapi:"^1.4.4","exif-reader":"^2.0.2","extract-zip":"^2.0.1",icc:"^3.0.0","jsdoc-to-markdown":"^9.1.1","license-checker":"^25.0.1",mocha:"^11.7.1","node-addon-api":"^8.4.0","node-gyp":"^11.2.0",nyc:"^17.1.0",semistandard:"^17.0.0","tar-fs":"^3.1.0",tsd:"^0.32.0"},license:"Apache-2.0",engines:{node:"^18.17.0 || ^20.3.0 || >=21.0.0"},config:{libvips:">=8.17.1"},funding:{url:"https://opencollective.com/libvips"},semistandard:{env:["mocha"]},cc:{linelength:"120",filter:["build/include"]},nyc:{include:["lib"]},tsd:{directory:"test/types/"}}});var gUe=F((SQa,oft)=>{"use strict";c();var{spawnSync:BEe}=le("node:child_process"),{createHash:Ban}=le("node:crypto"),lft=sUe(),Oan=Lse(),Tan=c6(),$vt=CEe(),{config:Uan,engines:eft,optionalDependencies:Man}=hUe(),_an=process.env.npm_package_config_libvips||Uan.libvips,nft=lft(_an).version,Dan=["darwin-arm64","darwin-x64","linux-arm","linux-arm64","linux-ppc64","linux-s390x","linux-x64","linuxmusl-arm64","linuxmusl-x64","win32-arm64","win32-ia32","win32-x64"],OEe={encoding:"utf8",shell:!0},zan=t=>{t instanceof Error?console.error(`sharp: Installation error: ${t.message}`):console.log(`sharp: ${t}`)},rft=()=>$vt.isNonGlibcLinuxSync()?$vt.familySync():"",Pan=()=>`${process.platform}${rft()}-${process.arch}`,d6=()=>{if(aft())return"wasm32";let{npm_config_arch:t,npm_config_platform:e,npm_config_libc:l}=process.env,n=typeof l=="string"?l:rft();return`${e||process.platform}${n}-${t||process.arch}`},jan=()=>{try{return le(`@img/sharp-libvips-dev-${d6()}/include`)}catch{try{return le("@img/sharp-libvips-dev/include")}catch{}}return""},Kan=()=>{try{return le("@img/sharp-libvips-dev/cplusplus")}catch{}return""},qan=()=>{try{return le(`@img/sharp-libvips-dev-${d6()}/lib`)}catch{try{return le(`@img/sharp-libvips-${d6()}/lib`)}catch{}}return""},$an=()=>{if(process.release?.name==="node"&&process.versions&&!Tan(process.versions.node,eft.node))return{found:process.versions.node,expected:eft.node}},aft=()=>{let{CC:t}=process.env;return!!(t&&t.endsWith("/emcc"))},eIn=()=>process.platform==="darwin"&&process.arch==="x64"?(BEe("sysctl sysctl.proc_translated",OEe).stdout||"").trim()==="sysctl.proc_translated: 1":!1,tft=t=>Ban("sha512").update(t).digest("hex"),tIn=()=>{try{let t=tft(`imgsharp-libvips-${d6()}`),e=lft(Man[`@img/sharp-libvips-${d6()}`],{includePrerelease:!0}).version;return tft(`${t}npm:${e}`).slice(0,10)}catch{}return""},lIn=()=>BEe(`node-gyp rebuild --directory=src ${aft()?"--nodedir=emscripten":""}`,{...OEe,stdio:"inherit"}).status,Ift=()=>process.platform!=="win32"?(BEe("pkg-config --modversion vips-cpp",{...OEe,env:{...process.env,PKG_CONFIG_PATH:sft()}}).stdout||"").trim():"",sft=()=>process.platform!=="win32"?[(BEe('which brew >/dev/null 2>&1 && brew environment --plain | grep PKG_CONFIG_LIBDIR | cut -d" " -f2',OEe).stdout||"").trim(),process.env.PKG_CONFIG_PATH,"/usr/local/lib/pkgconfig","/usr/lib/pkgconfig","/usr/local/libdata/pkgconfig","/usr/libdata/pkgconfig"].filter(Boolean).join(":"):"",AUe=(t,e,l)=>(l&&l(`Detected ${e}, skipping search for globally-installed libvips`),t),nIn=t=>{if(process.env.SHARP_IGNORE_GLOBAL_LIBVIPS)return AUe(!1,"SHARP_IGNORE_GLOBAL_LIBVIPS",t);if(process.env.SHARP_FORCE_GLOBAL_LIBVIPS)return AUe(!0,"SHARP_FORCE_GLOBAL_LIBVIPS",t);if(eIn())return AUe(!1,"Rosetta",t);let e=Ift();return!!e&&Oan(e,nft)};oft.exports={minimumLibvipsVersion:nft,prebuiltPlatforms:Dan,buildPlatformArch:d6,buildSharpLibvipsIncludeDir:jan,buildSharpLibvipsCPlusPlusDir:Kan,buildSharpLibvipsLibDir:qan,isUnsupportedNodeRuntime:$an,runtimePlatformArch:Pan,log:zan,yarnLocator:tIn,spawnRebuild:lIn,globalLibvipsVersion:Ift,pkgConfigPath:sft,useGlobalLibvips:nIn}});var Bse=F((TQa,cft)=>{"use strict";c();var{familySync:rIn,versionSync:aIn}=CEe(),{runtimePlatformArch:IIn,isUnsupportedNodeRuntime:ift,prebuiltPlatforms:sIn,minimumLibvipsVersion:oIn}=gUe(),RB=IIn(),iIn=[`../src/build/Release/sharp-${RB}.node`,"../src/build/Release/sharp-wasm32.node",`@img/sharp-${RB}/sharp.node`,"@img/sharp-wasm32/sharp.node"],ZUe,u6,Sse=[];for(ZUe of iIn)try{u6=le(ZUe);break}catch(t){Sse.push(t)}if(u6&&ZUe.startsWith("@img/sharp-linux-x64")&&!u6._isUsingX64V2()){let t=new Error("Prebuilt binaries for linux-x64 require v2 microarchitecture");t.code="Unsupported CPU",Sse.push(t),u6=null}if(u6)cft.exports=u6;else{let[t,e,l]=["linux","darwin","win32"].map(a=>RB.startsWith(a)),n=[`Could not load the "sharp" module using the ${RB} runtime`];Sse.forEach(a=>{a.code!=="MODULE_NOT_FOUND"&&n.push(`${a.code}: ${a.message}`)});let r=Sse.map(a=>a.message).join(" ");if(n.push("Possible solutions:"),ift()){let{found:a,expected:I}=ift();n.push("- Please upgrade Node.js:",` Found ${a}`,` Requires ${I}`)}else if(sIn.includes(RB)){let[a,I]=RB.split("-"),s=a.endsWith("musl")?" --libc=musl":"";n.push("- 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=${a.replace("musl","")}${s} --cpu=${I} sharp`)}else n.push(`- Manually install libvips >= ${oIn}`,"- Add experimental WebAssembly-based dependencies:"," npm install --cpu=wasm32 sharp"," npm install @img/sharp-wasm32");if(t&&/(symbol not found|CXXABI_)/i.test(r))try{let{config:a}=le(`@img/sharp-libvips-${RB}/package`),I=`${rIn()} ${aIn()}`,s=`${a.musl?"musl":"glibc"} ${a.musl||a.glibc}`;n.push("- Update your OS:",` Found ${I}`,` Requires ${s}`)}catch{}throw t&&/\/snap\/core[0-9]{2}/.test(r)&&n.push("- Remove the Node.js Snap, which does not support native modules"," snap remove node"),e&&/Incompatible library version/.test(r)&&n.push("- Update Homebrew:"," brew update && brew upgrade vips"),Sse.some(a=>a.code==="ERR_DLOPEN_DISABLED")&&n.push("- Run Node.js without using the --no-addons flag"),l&&/The specified procedure could not be found/.test(r)&&n.push("- Using the canvas package on Windows?"," See https://sharp.pixelplumbing.com/install#canvas-and-windows","- Check for outdated versions of sharp in the dependency tree:"," npm ls sharp"),n.push("- Consult the installation documentation:"," See https://sharp.pixelplumbing.com/install"),new Error(n.join(` [0.29s] [0.29s] [0.29s] Error: Could not load the "sharp" module using the linux-arm64 runtime [0.29s] ERR_DLOPEN_FAILED: libresolv.so.2: cannot open shared object file: No such file or directory [0.29s] Possible solutions: [0.29s] - Ensure optional dependencies can be installed: [0.29s] npm install --include=optional sharp [0.29s] - Ensure your package manager supports multi-platform installation: [0.29s] See https://sharp.pixelplumbing.com/install#cross-platform [0.29s] - Add platform-specific dependencies: [0.29s] npm install --os=linux --cpu=arm64 sharp [0.29s] - Consult the installation documentation: [0.29s] See https://sharp.pixelplumbing.com/install [0.29s] at file:///home/brioche-runner-407fffb04f6da7002216c345dbb3165e6d1f9aef1757ffb44033a821351d6ef2/.local/share/brioche/locals/3564a07b7dbeed9b03fa3519acb24c64c3bfd781abf0de5c2962d6546b789f11/lib/node_modules/@github/copilot/index.js:575:35322 [0.29s] at file:///home/brioche-runner-407fffb04f6da7002216c345dbb3165e6d1f9aef1757ffb44033a821351d6ef2/.local/share/brioche/locals/3564a07b7dbeed9b03fa3519acb24c64c3bfd781abf0de5c2962d6546b789f11/lib/node_modules/@github/copilot/index.js:12:501 [0.29s] at file:///home/brioche-runner-407fffb04f6da7002216c345dbb3165e6d1f9aef1757ffb44033a821351d6ef2/.local/share/brioche/locals/3564a07b7dbeed9b03fa3519acb24c64c3bfd781abf0de5c2962d6546b789f11/lib/node_modules/@github/copilot/index.js:576:102 [0.29s] at file:///home/brioche-runner-407fffb04f6da7002216c345dbb3165e6d1f9aef1757ffb44033a821351d6ef2/.local/share/brioche/locals/3564a07b7dbeed9b03fa3519acb24c64c3bfd781abf0de5c2962d6546b789f11/lib/node_modules/@github/copilot/index.js:12:501 [0.29s] at file:///home/brioche-runner-407fffb04f6da7002216c345dbb3165e6d1f9aef1757ffb44033a821351d6ef2/.local/share/brioche/locals/3564a07b7dbeed9b03fa3519acb24c64c3bfd781abf0de5c2962d6546b789f11/lib/node_modules/@github/copilot/index.js:576:84097 [0.29s] at file:///home/brioche-runner-407fffb04f6da7002216c345dbb3165e6d1f9aef1757ffb44033a821351d6ef2/.local/share/brioche/locals/3564a07b7dbeed9b03fa3519acb24c64c3bfd781abf0de5c2962d6546b789f11/lib/node_modules/@github/copilot/index.js:12:501 [0.29s] at file:///home/brioche-runner-407fffb04f6da7002216c345dbb3165e6d1f9aef1757ffb44033a821351d6ef2/.local/share/brioche/locals/3564a07b7dbeed9b03fa3519acb24c64c3bfd781abf0de5c2962d6546b789f11/lib/node_modules/@github/copilot/index.js:1399:5470 [0.29s] [0.29s] Node.js v25.0.0 [0.30s] [process exited with code 1]Same kind of error, I think.
It worked for me on macOS:
$ 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: ...This:
npm i -g @github/copilot@0.0.350-7Worked for me on native windows.
Reacted by Damian Hickey
Describe the bug
Just upgraded copilot CLI and now copilot won't start. This is the error message:
None of the suggested solutions made any difference.
Affected version
0.0.329
Steps to reproduce the behavior
Expected behavior
Should not throw an error.
Additional context
Windows 11, x86_64