cloudflare / next-on-pages

CLI to build and develop Next.js apps for Cloudflare Pages
https://www.npmjs.com/package/@cloudflare/next-on-pages
MIT License
1.29k stars 126 forks source link

[🐛 Bug]: Build failed on @cloudflare/next-on-pages@1.13.2 `Expected "}" but found "."` #870

Open MrMissx opened 2 months ago

MrMissx commented 2 months ago

next-on-pages environment related information

System:
    Platform: darwin
    Arch: arm64
    Version: Darwin Kernel Version 23.5.0: Wed May  1 20:16:51 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8103
    CPU: (8) arm64 Apple M1
    Memory: 8 GB
    Shell: /bin/zsh
Package Manager Used: pnpm (9.4.0)

Relevant Packages:
    @cloudflare/next-on-pages: 1.13.2
    vercel: N/A
    next: 13.4.9

Description

Build failed when using @cloudflare/next-on-pages@1.13.2 both on local and cloudflare deployment.

✘ [ERROR] Expected "}" but found "."

Not happened on @cloudflare/next-on-pages@1.13.1.

Reproduction

No response

Pages Deployment Method

Pages CI (GitHub/GitLab integration)

Pages Deployment ID

No response

Additional Information

2024-09-02T06:27:40.884067Z ⚡️ Completed `pnpm dlx vercel build`.
2024-09-02T06:28:01.907372Z ✘ [ERROR] Expected "}" but found "."
2024-09-02T06:28:01.908077Z 
2024-09-02T06:28:01.908252Z     <stdin>:870:119296:
2024-09-02T06:28:01.908411Z       870 │ ...&&M(f,A[y],{that:A,ASglobalThis._ENTRIES:h})}),F=D.prototype,U...
2024-09-02T06:28:01.908551Z           │                                   ^
2024-09-02T06:28:01.908673Z           ╵                                   }
2024-09-02T06:28:01.908792Z 
2024-09-02T06:28:02.687368Z /opt/buildhome/.pnpm-store/v3/tmp/dlx-757/node_modules/.pnpm/esbuild@0.15.18/node_modules/esbuild/lib/main.js:1575
2024-09-02T06:28:02.68765Z    let error = new Error(`${text}${summary}`);
2024-09-02T06:28:02.687804Z               ^
2024-09-02T06:28:02.688137Z 
2024-09-02T06:28:02.688343Z Error: Build failed with 1 error:
2024-09-02T06:28:02.688498Z <stdin>:870:119296: ERROR: Expected "}" but found "."
2024-09-02T06:28:02.688672Z     at failureErrorWithLog (/opt/buildhome/.pnpm-store/v3/tmp/dlx-757/node_modules/.pnpm/esbuild@0.15.18/node_modules/esbuild/lib/main.js:1575:15)
2024-09-02T06:28:02.688847Z     at /opt/buildhome/.pnpm-store/v3/tmp/dlx-757/node_modules/.pnpm/esbuild@0.15.18/node_modules/esbuild/lib/main.js:1033:28
2024-09-02T06:28:02.688948Z     at runOnEndCallbacks (/opt/buildhome/.pnpm-store/v3/tmp/dlx-757/node_modules/.pnpm/esbuild@0.15.18/node_modules/esbuild/lib/main.js:1447:61)
2024-09-02T06:28:02.689046Z     at buildResponseToResult (/opt/buildhome/.pnpm-store/v3/tmp/dlx-757/node_modules/.pnpm/esbuild@0.15.18/node_modules/esbuild/lib/main.js:1031:7)
2024-09-02T06:28:02.689159Z     at /opt/buildhome/.pnpm-store/v3/tmp/dlx-757/node_modules/.pnpm/esbuild@0.15.18/node_modules/esbuild/lib/main.js:1143:14
2024-09-02T06:28:02.68926Z      at responseCallbacks.<computed> (/opt/buildhome/.pnpm-store/v3/tmp/dlx-757/node_modules/.pnpm/esbuild@0.15.18/node_modules/esbuild/lib/main.js:680:9)
2024-09-02T06:28:02.689369Z     at handleIncomingPacket (/opt/buildhome/.pnpm-store/v3/tmp/dlx-757/node_modules/.pnpm/esbuild@0.15.18/node_modules/esbuild/lib/main.js:735:9)
2024-09-02T06:28:02.689459Z     at Socket.readFromStdout (/opt/buildhome/.pnpm-store/v3/tmp/dlx-757/node_modules/.pnpm/esbuild@0.15.18/node_modules/esbuild/lib/main.js:656:7)
2024-09-02T06:28:02.689541Z     at Socket.emit (node:events:514:28)
2024-09-02T06:28:02.690012Z     at addChunk (node:internal/streams/readable:324:12) {
2024-09-02T06:28:02.690144Z   errors: [
2024-09-02T06:28:02.690241Z     {
2024-09-02T06:28:02.690357Z       detail: undefined,
2024-09-02T06:28:02.690466Z       id: '',
2024-09-02T06:28:02.690557Z       location: {
2024-09-02T06:28:02.690643Z         column: 119296,
2024-09-02T06:28:02.690728Z         file: '<stdin>',
2024-09-02T06:28:02.690815Z         length: 1,
2024-09-02T06:28:02.690898Z         line: 870,
2024-09-02T06:28:02.69101Z          lineText: ' */function X(A,B){if(A===B)return 0;for(var h=A.length,f=B.length,w=0,E=Math.min(h,f);w<E;++w)if(A[w]!==B[w]){h=A[w],f=B[w];break}return h<f?-1:f<h?1:0}var q=void 0;function $(A,B,h,f){if(A===B)return 0!==A||!h||y(A,B);if(h){if("object"!==E(A))return"number"==typeof A&&I(A)&&I(B);if("object"!==E(B)||null===A||null===B||Object.getPrototypeOf(A)!==Object.getPrototypeOf(B))return!1}else{if(null===A||"object"!==E(A))return(null===B||"object"!==E(B))&&A==B;if(null===B||"object"!==E(B))return!1}var w=S(A);if(w!==S(B))return!1;if(Array.isArray(A)){if(A.length!==B.length)return!1;var C=_(A,q),M=_(B,q);return C.length===M.length&&Ae(A,B,h,f,1,C)}if("[object Object]"===w&&(!R(A)&&R(B)||!k(A)&&k(B)))return!1;if(z(A)){if(!z(B)||Date.prototype.getTime.call(A)!==Date.prototype.getTime.call(B))return!1}else if(T(A)){if(!T(B)||(Q?A.source!==B.source||A.flags!==B.flags:RegExp.prototype.toString.call(A)!==RegExp.prototype.toString.call(B)))return!1}else if(G(A)||A instanceof Error){if(A.message!==B.message||A.name!==B.name)return!1}else if(N(A)){if(!h&&(K(A)||V(A))){if(!function(A,B){if(A.byteLength!==B.byteLength)return!1;for(var h=0;h<A.byteLength;h++)if(A[h]!==B[h])return!1;return!0}(A,B))return!1}else if(A.byteLength!==B.byteLength||0!==X(new Uint8Array(A.buffer,A.byteOffset,A.byteLength),new Uint8Array(B.buffer,B.byteOffset,B.byteLength)))return!1;var D=_(A,q),v=_(B,q);return D.length===v.length&&Ae(A,B,h,f,0,D)}else if(k(A))return!!k(B)&&A.size===B.size&&Ae(A,B,h,f,2);else if(R(A))return!!R(B)&&A.size===B.size&&Ae(A,B,h,f,3);else if(P(A)){if(A.byteLength!==B.byteLength||0!==X(new Uint8Array(A),new Uint8Array(B)))return!1}else if(H(A)&&(L(A)?!(L(B)&&y(Number.prototype.valueOf.call(A),Number.prototype.valueOf.call(B))):j(A)?!j(B)||String.prototype.valueOf.call(A)!==String.prototype.valueOf.call(B):J(A)?!J(B)||Boolean.prototype.valueOf.call(A)!==Boolean.prototype.valueOf.call(B):O(A)?!O(B)||BigInt.prototype.valueOf.call(A)!==BigInt.prototype.valueOf.call(B):!W(B)||Symbol.prototype.valueOf.call(A)!==Symbol.prototype.valueOf.call(B)))return!1;return Ae(A,B,h,f,0)}function AA(A,B){return B.filter(function(B){return Y(A,B)})}function Ae(A,B,h,w,Q,y){if(5==arguments.length){y=Object.keys(A);var I=Object.keys(B);if(y.length!==I.length)return!1}for(var v=0;v<y.length;v++)if(!F(B,y[v]))return!1;if(h&&5==arguments.length){var S=D(A);if(0!==S.length){var U=0;for(v=0;v<S.length;v++){var P=S[v];if(Y(A,P)){if(!Y(B,P))return!1;y.push(P),U++}else if(Y(B,P))return!1}var N=D(B);if(S.length!==N.length&&AA(B,N).length!==U)return!1}else{var z=D(B);if(0!==z.length&&0!==AA(B,z).length)return!1}}if(0===y.length&&(0===Q||1===Q&&0===A.length||0===A.size))return!0;if(void 0===w)w={val1:new Map,val2:new Map,position:0};else{var R=w.val1.get(A);if(void 0!==R){var T=w.val2.get(B);if(void 0!==T)return R===T}w.position++}w.val1.set(A,w.position),w.val2.set(B,w.position);var k=function(A,B,h,w,Q,y){var D=0;if(2===y){if(!function(A,B,h,f){for(var w=null,Q=C(A),M=0;M<Q.length;M++){var y=Q[M];if("object"===E(y)&&null!==y)null===w&&(w=new Set),w.add(y);else if(!B.has(y)){if(h||!function(A,B,h){var f=Ar(h);return null!=f?f:B.has(f)&&!A.has(f)}(A,B,y))return!1;null===w&&(w=new Set),w.add(y)}}if(null!==w){for(var D=C(B),I=0;I<D.length;I++){var v=D[I];if("object"===E(v)&&null!==v){if(!At(w,v,h,f))return!1}else if(!h&&!A.has(v)&&!At(w,v,h,f))return!1}return 0===w.size}return!0}(A,B,h,Q))return!1}else if(3===y){if(!function(A,B,h,w){for(var Q=null,C=M(A),y=0;y<C.length;y++){var D=f(C[y],2),I=D[0],v=D[1];if("object"===E(I)&&null!==I)null===Q&&(Q=new Set),Q.add(I);else{var F=B.get(I);if(void 0===F&&!B.has(I)||!$(v,F,h,w)){if(h||!function(A,B,h,f,w){var E=Ar(h);if(null!=E)return E;var Q=B.get(E);return!!((void 0!==Q||B.has(E))&&$(f,Q,!1,w))&&!A.has(E)&&$(f,Q,!1,w)}(A,B,I,v,w))return!1;null===Q&&(Q=new Set),Q.add(I)}}}if(null!==Q){for(var Y=M(B),S=0;S<Y.length;S++){var U=f(Y[S],2),P=U[0],N=U[1];if("object"===E(P)&&null!==P){if(!An(Q,A,P,N,h,w))return!1}else if(!h&&(!A.has(P)||!$(A.get(P),N,!1,w))&&!An(Q,A,P,N,!1,w))return!1}return 0===Q.size}return!0}(A,B,h,Q))return!1}else if(1===y)for(;D<A.length;D++)if(F(A,D)){if(!F(B,D)||!$(A[D],B[D],h,Q))return!1}else{if(F(B,D))return!1;for(var I=Object.keys(A);D<I.length;D++){var v=I[D];if(!F(B,v)||!$(A[v],B[v],h,Q))return!1}if(I.length!==Object.keys(B).length)return!1;return!0}for(D=0;D<w.length;D++){var Y=w[D];if(!$(A[Y],B[Y],h,Q))return!1}return!0}(A,B,h,y,w,Q);return w.val1.delete(A),w.val2.delete(B),k}function At(A,B,h,f){for(var w=C(A),E=0;E<w.length;E++){var Q=w[E];if($(B,Q,h,f))return A.delete(Q),!0}return!1}function Ar(A){switch(E(A)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":A=+A;case"number":if(I(A))return!1}return!0}function An(A,B,h,f,w,E){for(var Q=C(A),M=0;M<Q.length;M++){var y=Q[M];if($(h,y,w,E)&&$(f,B.get(y),w,E))return A.delete(y),!0}return!1}A.exports={isDeepEqual:function(A,B){return $(A,B,!1)},isDeepStrictEqual:function(A,B){return $(A,B,!0)}}},32504:function(A,B){"use strict";B.byteLength=function(A){var B=M(A),h=B[0],f=B[1];return(h+f)*3/4-f},B.toByteArray=function(A){var B,h,E=M(A),Q=E[0],C=E[1],y=new w((Q+C)*3/4-C),D=0,I=C>0?Q-4:Q;for(h=0;h<I;h+=4)B=f[A.charCodeAt(h)]<<18|f[A.charCodeAt(h+1)]<<12|f[A.charCodeAt(h+2)]<<6|f[A.charCodeAt(h+3)],y[D++]=B>>16&255,y[D++]=B>>8&255,y[D++]=255&B;return 2===C&&(B=f[A.charCodeAt(h)]<<2|f[A.charCodeAt(h+1)]>>4,y[D++]=255&B),1===C&&(B=f[A.charCodeAt(h)]<<10|f[A.charCodeAt(h+1)]<<4|f[A.charCodeAt(h+2)]>>2,y[D++]=B>>8&255,y[D++]=255&B),y},B.fromByteArray=function(A){for(var B,f=A.length,w=f%3,E=[],Q=0,C=f-w;Q<C;Q+=16383)E.push(function(A,B,f){for(var w,E=[],Q=B;Q<f;Q+=3)E.push(h[(w=(A[Q]<<16&16711680)+(A[Q+1]<<8&65280)+(255&A[Q+2]))>>18&63]+h[w>>12&63]+h[w>>6&63]+h[63&w]);return E.join("")}(A,Q,Q+16383>C?C:Q+16383));return 1===w?E.push(h[(B=A[f-1])>>2]+h[B<<4&63]+"=="):2===w&&E.push(h[(B=(A[f-2]<<8)+A[f-1])>>10]+h[B>>4&63]+h[B<<2&63]+"="),E.join("")};for(var h=[],f=[],w="undefined"!=typeof Uint8Array?Uint8Array:Array,E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Q=0,C=E.length;Q<C;++Q)h[Q]=E[Q],f[E.charCodeAt(Q)]=Q;function M(A){var B=A.length;if(B%4>0)throw Error("Invalid string. Length must be a multiple of 4");var h=A.indexOf("=");-1===h&&(h=B);var f=h===B?0:4-h%4;return[h,f]}f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63},34097:function(A){var B=new Uint32Array([0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215]);function h(A){this.buf_=new Uint8Array(8224),this.input_=A,this.reset()}h.READ_SIZE=4096,h.IBUF_MASK=8191,h.prototype.reset=function(){this.buf_ptr_=0,this.val_=0,this.pos_=0,this.bit_pos_=0,this.bit_end_pos_=0,this.eos_=0,this.readMoreInput();for(var A=0;A<4;A++)this.val_|=this.buf_[this.pos_]<<8*A,++this.pos_;return this.bit_end_pos_>0},h.prototype.readMoreInput=function(){if(!(this.bit_end_pos_>256)){if(this.eos_){if(this.bit_pos_>this.bit_end_pos_)throw Error("Unexpected end of input "+this.bit_pos_+" "+this.bit_end_pos_)}else{var A=this.buf_ptr_,B=this.input_.read(this.buf_,A,4096);if(B<0)throw Error("Unexpected end of input");if(B<4096){this.eos_=1;for(var h=0;h<32;h++)this.buf_[A+B+h]=0}if(0===A){for(var h=0;h<32;h++)this.buf_[8192+h]=this.buf_[h];this.buf_ptr_=4096}else this.buf_ptr_=0;this.bit_end_pos_+=B<<3}}},h.prototype.fillBitWindow=function(){for(;this.bit_pos_>=8;)this.val_>>>=8,this.val_|=this.buf_[8191&this.pos_]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},h.prototype.readBits=function(A){32-this.bit_pos_<A&&this.fillBitWindow();var h=this.val_>>>this.bit_pos_&B[A];return this.bit_pos_+=A,h},A.exports=h},7043:function(A,B){B.lookup=new Uint8Array([0,0,0,0,0,0,0,0,0,4,4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,12,16,12,12,20,12,16,24,28,12,12,32,12,36,12,44,44,44,44,44,44,44,44,44,44,32,32,24,40,28,12,12,48,52,52,52,48,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,24,12,28,12,12,12,56,60,60,60,56,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,24,12,28,12,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,'... 1648496 more characters,
2024-09-02T06:28:02.69118Z          namespace: '',
2024-09-02T06:28:02.691281Z         suggestion: '}'
2024-09-02T06:28:02.691388Z       },
2024-09-02T06:28:02.691485Z       notes: [],
2024-09-02T06:28:02.691566Z       pluginName: '',
2024-09-02T06:28:02.691645Z       text: 'Expected "}" but found "."'
2024-09-02T06:28:02.691726Z     }
2024-09-02T06:28:02.691809Z   ],
2024-09-02T06:28:02.691889Z   warnings: []
2024-09-02T06:28:02.691968Z }
2024-09-02T06:28:02.692059Z 
2024-09-02T06:28:02.692146Z Node.js v18.17.1
2024-09-02T06:28:03.582817Z Failed: Error while executing user command. Exited with error code: 1
2024-09-02T06:28:03.594195Z Failed: build command exited with code: 1
2024-09-02T06:28:05.352014Z Failed: error occurred while running build command

Would you like to help?

MrMissx commented 4 days ago

still happened on 1.13.5

seems like this was an issue on the esbuild ?

✘ [ERROR] Expected "}" but found "."

    <stdin>:738:449387:
      738 │ ...),h||(t.size=0),void 0!=r&&c(r,t[u],{that:t,ASglobalThis._ENTRIES:n})}),d=l.prototype,v=g(e),y=function(t,e,n){v...
          │                                                            ^
          ╵                                                            }

⚡️ Unexpected error: Build failed with 1 error:
⚡️ <stdin>:738:449387: ERROR: Expected "}" but found "."
fatal error: all goroutines are asleep - deadlock!

goroutine 1 [semacquire]:
sync.runtime_Semacquire(0x14000182000?)
    runtime/sema.go:62 +0x28
sync.(*WaitGroup).Wait(0x140001862d8)
    sync/waitgroup.go:139 +0x80
main.runService.func2()
    github.com/evanw/esbuild/cmd/esbuild/service.go:150 +0xf8
main.runService(0x1)
    github.com/evanw/esbuild/cmd/esbuild/service.go:204 +0x448
main.main()
    github.com/evanw/esbuild/cmd/esbuild/main.go:228 +0x1b0

goroutine 18 [chan receive]:
main.runService.func1()
    github.com/evanw/esbuild/cmd/esbuild/service.go:111 +0x4c
created by main.runService
    github.com/evanw/esbuild/cmd/esbuild/service.go:109 +0x154

goroutine 19 [chan receive]:
main.(*serviceType).sendRequest(0x140001862c0, {0x100ddbd60, 0x140005bc0c0})
    github.com/evanw/esbuild/cmd/esbuild/service.go:252 +0x210
main.runService.func3()
    github.com/evanw/esbuild/cmd/esbuild/service.go:161 +0x38
created by main.runService
    github.com/evanw/esbuild/cmd/esbuild/service.go:158 +0x2b4

goroutine 320 [chan receive]:
main.(*serviceType).sendRequest(0x140001862c0, {0x100ddbd60, 0x140000fa030})
    github.com/evanw/esbuild/cmd/esbuild/service.go:252 +0x210
main.(*serviceType).convertPlugins.func2.2()
    github.com/evanw/esbuild/cmd/esbuild/service.go:800 +0x114
github.com/evanw/esbuild/pkg/api.(*pluginImpl).onStart.func1()
    github.com/evanw/esbuild/pkg/api/api_impl.go:1629 +0x34
github.com/evanw/esbuild/internal/bundler.ScanBundle.func1({{0x100cb6908, 0x12}, {0x14006ba0270, 0x1, 0x1}, {0x140005bc570, 0x1, 0x1}, {0x140005bc5d0, 0x1, ...}}, ...)
    github.com/evanw/esbuild/internal/bundler/bundler.go:1120 +0x7c
created by github.com/evanw/esbuild/internal/bundler.ScanBundle
    github.com/evanw/esbuild/internal/bundler/bundler.go:1119 +0x888

goroutine 433 [chan send]:
github.com/evanw/esbuild/internal/bundler.ScanBundle.func2()
    github.com/evanw/esbuild/internal/bundler/bundler.go:1151 +0x1bc
created by github.com/evanw/esbuild/internal/bundler.ScanBundle
    github.com/evanw/esbuild/internal/bundler/bundler.go:1149 +0x564

goroutine 418 [semacquire]:
sync.runtime_Semacquire(0x1400af10d00?)
    runtime/sema.go:62 +0x28
sync.(*WaitGroup).Wait(0x1400046a340)
    sync/waitgroup.go:139 +0x80
github.com/evanw/esbuild/internal/bundler.ScanBundle({_, _, _, _, _, _}, {_, _}, {_, _}, ...)
    github.com/evanw/esbuild/internal/bundler/bundler.go:1197 +0x56c
github.com/evanw/esbuild/pkg/api.rebuildImpl({0x2, 0x4, 0x0, 0x140005bc270, 0x0, {0x0, 0x0}, 0x0, 0xa, {0x0, ...}, ...}, ...)
    github.com/evanw/esbuild/pkg/api/api_impl.go:1143 +0x1748
github.com/evanw/esbuild/pkg/api.buildImpl({0x2, 0x4, 0x0, 0x140005bc270, 0x0, {0x0, 0x0}, 0x0, 0xa, {0x0, ...}, ...})
    github.com/evanw/esbuild/pkg/api/api_impl.go:871 +0x474
github.com/evanw/esbuild/pkg/api.Build(...)
    github.com/evanw/esbuild/pkg/api/api.go:366
main.(*serviceType).handleBuildRequest(0x140001862c0, 0x16?, 0x140005bc0f0?)
    github.com/evanw/esbuild/cmd/esbuild/service.go:549 +0x7cc
main.(*serviceType).handleIncomingPacket(0x1?, {0x14000c1c000?, 0x0?, 0x100e43020?})
    github.com/evanw/esbuild/cmd/esbuild/service.go:281 +0x124
main.runService.func4()
    github.com/evanw/esbuild/cmd/esbuild/service.go:192 +0x30
created by main.runService
    github.com/evanw/esbuild/cmd/esbuild/service.go:191 +0x45c
 ELIFECYCLE  Command failed with exit code 1.