New error popping up when I to deploy my rails app after making some minor text changes

Just started happening after this minor change.

=> ERROR [stage-4 8/8] RUN bin/rails fly:build 10.9s

[stage-4 8/8] RUN bin/rails fly:build:
#26 4.218 ➤ YN0070: Migrating from Yarn 1; automatically enabling the compatibility node-modules linker :+1:
#26 4.219
#26 4.369 ➤ YN0000: ┌ Resolution step
#26 5.021 ➤ YN0061: │ querystring@npm:0.2.0 is deprecated: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
#26 5.297 ➤ YN0061: │ chokidar@npm:2.1.8 is deprecated: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
#26 5.482 ➤ YN0061: │ uuid@npm:3.4.0 is deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See There’s Math.random(), and then there’s Math.random() · V8 for details.
#26 5.632 ➤ YN0061: │ fsevents@npm:1.2.13 is deprecated: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
#26 5.885 ➤ YN0032: │ nan@npm:2.17.0: Implicit dependencies on node-gyp are discouraged
#26 6.224 ➤ YN0061: │ source-map-resolve@npm:0.5.3 is deprecated: See GitHub - lydell/source-map-resolve: [DEPRECATED] Resolve the source map and/or sources for a generated file.
#26 6.448 ➤ YN0061: │ resolve-url@npm:0.2.1 is deprecated: GitHub - lydell/resolve-url: [DEPRECATED] Like Node.js’ `path.resolve`/`url.resolve` for the browser.
#26 6.449 ➤ YN0061: │ source-map-url@npm:0.4.1 is deprecated: See GitHub - lydell/source-map-url: [DEPRECATED] Tools for working with sourceMappingURL comments.
#26 6.452 ➤ YN0061: │ urix@npm:0.1.0 is deprecated: Please see GitHub - lydell/urix: [DEPRECATED] Makes Windows-style paths more unix and URI friendly.
#26 6.894 ➤ YN0032: │ fsevents@npm:2.3.2: Implicit dependencies on node-gyp are discouraged
#26 7.650 ➤ YN0061: │ @npmcli/move-file@npm:2.0.1 is deprecated: This functionality has been moved to @npmcli/fs
#26 7.651 ➤ YN0061: │ @npmcli/move-file@npm:1.1.2 is deprecated: This functionality has been moved to @npmcli/fs
#26 8.367 ➤ YN0061: │ flatten@npm:1.0.3 is deprecated: flatten is deprecated in favor of utility frameworks such as lodash.
#26 8.733 ➤ YN0061: │ svgo@npm:1.3.2 is deprecated: This SVGO version is no longer supported. Upgrade to v2.x.x.
#26 8.772 ➤ YN0061: │ stable@npm:0.1.8 is deprecated: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: Array.prototype.sort() - JavaScript | MDN
#26 9.849 ➤ YN0032: │ evp_bytestokey@npm:1.0.3: Implicit dependencies on node-gyp are discouraged
#26 10.29 ➤ YN0000: └ Completed in 5s 919ms
#26 10.38 ➤ YN0000: ┌ Post-resolution validation
#26 10.38 ➤ YN0028: │ The lockfile would have been modified by this install, which is explicitly forbidden.
#26 10.38 ➤ YN0000: └ Completed
#26 10.38 ➤ YN0000: Failed with errors in 6s 13ms
#26 10.47 I, [2023-01-20T02:00:05.776828 #1] INFO – : Writing /app/public/assets/error-156d4702ea339f07f4afcf1b3a8376da763dea6f9dc6461f2602c8d3c6371a84.png
#26 10.47 I, [2023-01-20T02:00:05.777521 #1] INFO – : Writing /app/public/assets/gritter-close-b45e4e3265c1091c50b3531a5a7a21b726b397adb6ca081d82797e0d29165781.png
#26 10.47 I, [2023-01-20T02:00:05.778104 #1] INFO – : Writing /app/public/assets/gritter-84f45eb6efbd0f9313e3cf0d81dcea4cbb2ed8552c6babeca799f71a8d879213.png
#26 10.47 I, [2023-01-20T02:00:05.778819 #1] INFO – : Writing /app/public/assets/ie-spacer-c404c6ad7ced964722cc14635cc2e0a5b924b13c4120c02e51f6d16d39553c3a.gif
#26 10.47 I, [2023-01-20T02:00:05.779204 #1] INFO – : Writing /app/public/assets/notice-e348463c1fa5eabe612eb21ac03b550b5e9278df27b26dc21d745205c1fd9bee.png
#26 10.47 I, [2023-01-20T02:00:05.779657 #1] INFO – : Writing /app/public/assets/progress-4401130d700faadafe42bf322264e2689dae9ded22c1186c38ad2699d28b9715.gif
#26 10.47 I, [2023-01-20T02:00:05.779938 #1] INFO – : Writing /app/public/assets/success-abc60b9ec6e86a3254ee885da0f04a6d2b9c68e044ee5976710d7b8bf8fdddc3.png
#26 10.47 I, [2023-01-20T02:00:05.780128 #1] INFO – : Writing /app/public/assets/warning-c8acc23f866cdb032492373cc343f0121f867e0eb28f5efe1c0b0de71371133c.png
#26 10.47 I, [2023-01-20T02:00:05.780793 #1] INFO – : Writing /app/public/assets/manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js
#26 10.47 I, [2023-01-20T02:00:05.781526 #1] INFO – : Writing /app/public/assets/manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js.gz
#26 10.47 I, [2023-01-20T02:00:05.781876 #1] INFO – : Writing /app/public/assets/favicon-99f7ffd3b4b4f5f0dc6803372c4e1f1a3347e305d56651e29879f5a66c622f5a.ico
#26 10.47 I, [2023-01-20T02:00:05.782597 #1] INFO – : Writing /app/public/assets/favicon-99f7ffd3b4b4f5f0dc6803372c4e1f1a3347e305d56651e29879f5a66c622f5a.ico.gz
#26 10.47 I, [2023-01-20T02:00:05.783356 #1] INFO – : Writing /app/public/assets/programmer-e0e84c7fb09cf1e99f4639229eac577fd631a4c88f1074f73f6769382f7a8849.jpg
#26 10.47 I, [2023-01-20T02:00:05.783952 #1] INFO – : Writing /app/public/assets/application-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.css
#26 10.47 I, [2023-01-20T02:00:05.784399 #1] INFO – : Writing /app/public/assets/application-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.css.gz
#26 10.47 I, [2023-01-20T02:00:05.784926 #1] INFO – : Writing /app/public/assets/contacts-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.css
#26 10.47 I, [2023-01-20T02:00:05.785351 #1] INFO – : Writing /app/public/assets/contacts-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.css.gz
#26 10.47 I, [2023-01-20T02:00:05.785823 #1] INFO – : Writing /app/public/assets/portfolio-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.css
#26 10.47 I, [2023-01-20T02:00:05.786079 #1] INFO – : Writing /app/public/assets/portfolio-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.css.gz
#26 10.85 Webpacker requires Yarn “>=1 <4” and you are using 4.0.0-rc.36
#26 10.85 Please upgrade Yarn Installation | Yarn
#26 10.85 Exiting!


Error failed to fetch an image or build from source: error building: executor failed running [/bin/bash -o pipefail -c ${BUILD_COMMAND}]: exit code: 1

Looks like you are using Yarn v1, something is upgrading you to a pre-release of yarn 4, and then something else isn’t happy with that version. What fun.

It looks like running the following commands will get you a good version of yarn:

yarn init -2
yarn set version stable

Then, run yarn -v, and update the ARG YARN_VERSION= line in your Dockerfile.

Thank you! I am getting farther now… But now it seems this error is being raised:
Error failed to fetch an image or build from source: error building: failed to compute cache key: “/app/node_modules” not found: not found

Here is the output.
==> Verifying app config
→ Verified app config
==> Building image
Remote builder fly-builder-spring-night-8625 ready
==> Creating build context
→ Creating build context done
==> Building image with Docker
→ docker host: 20.10.12 linux x86_64
[+] Building 1.8s (0/1)
[+] Building 19.8s (23/26)
=> [internal] load remote build context 0.0s
=> copy /context / 0.3s
=> resolve image config for docker.io/docker/dockerfile:experimental 0.3s
=> CACHED docker-image://docker.io/docker/dockerfile:experimental@sha256:600e5c62eedff338b3f7a0850beb7c05866e0ef27b2d2e8c02aa468e78496ff5 0.0s
=> [internal] load metadata for Quay 0.2s
=> [base 1/6] FROM Quay 0.0s
=> CACHED [base 2/6] RUN mkdir /app 0.0s
=> CACHED [base 3/6] WORKDIR /app 0.0s
=> CACHED [base 4/6] RUN mkdir -p tmp/pids 0.0s
=> CACHED [base 5/6] RUN curl https://get.volta.sh | bash 0.0s
=> CACHED [base 6/6] RUN volta install node@16.17.0 yarn 0.0s
=> CACHED [stage-4 1/8] RUN --mount=type=cache,id=prod-apt-cache,sharing=locked,target=/var/cache/apt --mount=type=cache,id=prod-apt-lib,sharing=locked,target=/var/lib/apt 0.0s
=> CACHED [build_deps 1/1] RUN --mount=type=cache,id=dev-apt-cache,sharing=locked,target=/var/cache/apt --mount=type=cache,id=dev-apt-lib,sharing=locked,target=/var/lib/apt 0.0s
=> [node_modules 1/3] COPY packagejson ./ 0.0s
=> CACHED [gems 1/3] RUN gem update --system --no-document && gem install -N bundler -v 2.3.10 0.0s
=> CACHED [gems 2/3] COPY Gemfile
./ 0.0s
=> [node_modules 2/3] COPY yarn.* ./ 0.0s
=> CANCELED [gems 3/3] RUN bundle install && rm -rf vendor/bundle/ruby/*/cache 18.7s
=> [node_modules 3/3] RUN volta install yarn && yarn install; 18.4s
=> CACHED [stage-4 2/8] COPY --from=gems /app /app 0.0s
=> CACHED [stage-4 3/8] COPY --from=gems /usr/lib/fullstaq-ruby/versions /usr/lib/fullstaq-ruby/versions 0.0s
=> CACHED [stage-4 4/8] COPY --from=gems /usr/local/bundle /usr/local/bundle 0.0s
=> ERROR [stage-4 5/8] COPY --from=node_modules /app/node_modules /app/node_modules 0.0s

[stage-4 5/8] COPY --from=node_modules /app/node_modules /app/node_modules:


Error failed to fetch an image or build from source: error building: failed to compute cache key: “/app/node_modules” not found: not found

That step should have built /app/node_modules. Try changing it to

RUN volta install yarn@3.3.1 && yarn install

… substituting in the correct version of Yarn.

Still getting an error after updating yarn

[Error: Yarn install error]
Yarn install error: Yarn command finished with a non-zero exit code: exit status: 1
ERROR: failed to build: exit status 1
Error: failed to fetch an image or build from source: executing lifecycle: failed with status code: 51

this error still exists

Any ideas? Trying to deploy a new version with upgraded rails and Ruby and am getting the following error during deployment:

=> CACHED [base 2/6] RUN mkdir /app 0.0s
=> CACHED [base 3/6] WORKDIR /app 0.0s
=> CACHED [base 4/6] RUN mkdir -p tmp/pids 0.0s
=> CACHED [base 5/6] RUN curl https://get.volta.sh | bash 0.0s
=> CACHED [base 6/6] RUN volta install node@14 && volta install yarn 0.0s
=> CACHED [build_deps 1/1] RUN --mount=type=cache,id=dev-apt-cache,sharing=locked,target=/var/cache/apt --mount=type=cache,id=dev-apt-lib,sharing=locked,target=/var/lib/apt apt-g 0.0s
=> CACHED [stage-4 1/5] RUN --mount=type=cache,id=prod-apt-cache,sharing=locked,target=/var/cache/apt --mount=type=cache,id=prod-apt-lib,sharing=locked,target=/var/lib/apt apt-ge 0.0s
=> CANCELED [gems 1/3] RUN gem install -N bundler -v 2.3.10 0.4s
=> CACHED [node_modules 1/3] COPY packagejson ./ 0.0s
=> CACHED [node_modules 2/3] COPY yarn.
./ 0.0s
=> ERROR [node_modules 3/3] RUN if [ -f “yarn.lock” ]; then yarn install; elif [ -f “package-lock.json” ]; then npm install; else mkdir node_modules; fi 0.3s

[node_modules 3/3] RUN if [ -f “yarn.lock” ]; then yarn install; elif [ -f “package-lock.json” ]; then npm install; else mkdir node_modules; fi:
0.284 /root/.volta/tools/image/yarn/4.3.0/bin/yarn.js:4
0.284 (()=>{var $3e=Object.create;var NF=Object.defineProperty;var e_e=Object.getOwnPropertyDescriptor;var t_e=Object.getOwnPropertyNames;var r_e=Object.getPrototypeOf,n_e=Object.prototype.hasOwnProperty;var ve=(t=>typeof require<“u”?require:typeof Proxy<“u”?new Proxy(t,{get:(e,r)=>(typeof require<“u”?require:e)[r]}):t)(function(t){if(typeof require<“u”)return require.apply(this,arguments);throw new Error(‘Dynamic require of "’+t+‘" is not supported’)});var Et=(t,e)=>()=>(t&&(e=t(t=0)),e);var _=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),zt=(t,e)=>{for(var r in e)NF(t,r,{get:e[r],enumerable:!0})},i_e=(t,e,r,o)=>{if(e&&typeof e==“object”||typeof e==“function”)for(let a of t_e(e))!n_e.call(t,a)&&a!==r&&NF(t,a,{get:()=>e[a],enumerable:!(o=e_e(e,a))||o.enumerable});return t};var Ze=(t,e,r)=>(r=t!=null?$3e(r_e(t)):{},i_e(e||!t||!t.__esModule?NF(r,“default”,{value:t,enumerable:!0}):r,t));var vi={};zt(vi,{SAFE_TIME:()=>x7,S_IFDIR:()=>IP,S_IFLNK:()=>BP,S_IFMT:()=>Mu,S_IFREG:()=>_w});var Mu,IP,_w,BP,x7,k7=Et(()=>{Mu=61440,IP=16384,_w=32768,BP=40960,x7=456789e3});var nr={};zt(nr,{EBADF:()=>wo,EBUSY:()=>s_e,EEXIST:()=>A_e,EINVAL:()=>a_e,EISDIR:()=>u_e,ENOENT:()=>l_e,ENOSYS:()=>o_e,ENOTDIR:()=>c_e,ENOTEMPTY:()=>p_e,EOPNOTSUPP:()=>h_e,EROFS:()=>f_e,ERR_DIR_CLOSED:()=>OF});function Ll(t,e){return Object.assign(new Error(${t}: ${e}),{code:t})}function s_e(t){return Ll(“EBUSY”,t)}function o_e(t,e){return Ll(“ENOSYS”,${t}, ${e})}function a_e(t){return Ll(“EINVAL”,invalid argument, ${t})}function wo(t){return Ll(“EBADF”,bad file descriptor, ${t})}function l_e(t){return Ll(“ENOENT”,no such file or directory, ${t})}function c_e(t){return Ll(“ENOTDIR”,not a directory, ${t})}function u_e(t){return Ll(“EISDIR”,illegal operation on a directory, ${t})}function A_e(t){return Ll(“EEXIST”,file already exists, ${t})}function f_e(t){return Ll(“EROFS”,read-only filesystem, ${t})}function p_e(t){return Ll(“ENOTEMPTY”,directory not empty, ${t})}function h_e(t){return Ll(“EOPNOTSUPP”,operation not supported, ${t})}function OF(){return Ll(“ERR_DIR_CLOSED”,“Directory handle was closed”)}var vP=Et(()=>{});var Ea={};zt(Ea,{BigIntStatsEntry:()=>ey,DEFAULT_MODE:()=>_F,DirEntry:()=>MF,StatEntry:()=>$m,areStatsEqual:()=>HF,clearStats:()=>PP,convertToBigIntStats:()=>d_e,makeDefaultStats:()=>Q7,makeEmptyStats:()=>g_e});function Q7(){return new $m}function g_e(){return PP(Q7())}function PP(t){for(let e in t)if(Object.hasOwn(t,e)){let r=t[e];typeof r==“number”?t[e]=0:typeof r==“bigint”?t[e]=BigInt(0):UF.types.isDate(r)&&(t[e]=new Date(0))}return t}function d_e(t){let e=new ey;for(let r in t)if(Object.hasOwn(t,r)){let o=t[r];typeof o==“number”?e[r]=BigInt(o):UF.types.isDate(o)&&(e[r]=new Date(o))}return e.atimeNs=e.atimeMsBigInt(1e6),e.mtimeNs=e.mtimeMsBigInt(1e6),e.ctimeNs=e.ctimeMsBigInt(1e6),e.birthtimeNs=e.birthtimeMsBigInt(1e6),e}function HF(t,e){if(t.atimeMs!==e.atimeMs||t.birthtimeMs!==e.birthtimeMs||t.blksize!==e.blksize||t.blocks!==e.blocks||t.ctimeMs!==e.ctimeMs||t.dev!==e.dev||t.gid!==e.gid||t.ino!==e.ino||t.isBlockDevice()!==e.isBlockDevice()||t.isCharacterDevice()!==e.isCharacterDevice()||t.isDirectory()!==e.isDirectory()||t.isFIFO()!==e.isFIFO()||t.isFile()!==e.isFile()||t.isSocket()!==e.isSocket()||t.isSymbolicLink()!==e.isSymbolicLink()||t.mode!==e.mode||t.mtimeMs!==e.mtimeMs||t.nlink!==e.nlink||t.rdev!==e.rdev||t.size!==e.size||t.uid!==e.uid)return!1;let r=t,o=e;return!(r.atimeNs!==o.atimeNs||r.mtimeNs!==o.mtimeNs||r.ctimeNs!==o.ctimeNs||r.birthtimeNs!==o.birthtimeNs)}var UF,_F,MF,$m,ey,qF=Et(()=>{UF=Ze(ve(“util”)),_F=33188,MF=class{constructor(){this.name=“”;this.path=“”;this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},$m=class{constructor(){this.uid=0;this.gid=0;this.size=0;this.blksize=0;this.atimeMs=0;this.mtimeMs=0;this.ctimeMs=0;this.birthtimeMs=0;this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=0;this.ino=0;this.mode=_F;this.nlink=1;this.rdev=0;this.blocks=1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},ey=class{constructor(){this.uid=BigInt(0);this.gid=BigInt(0);this.size=BigInt(0);this.blksize=BigInt(0);this.atimeMs=BigInt(0);this.mtimeMs=BigInt(0);this.ctimeMs=BigInt(0);this.birthtimeMs=BigInt(0);this.atimeNs=BigInt(0);this.mtimeNs=BigInt(0);this.ctimeNs=BigInt(0);this.birthtimeNs=BigInt(0);this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=BigInt(0);this.ino=BigInt(0);this.mode=BigInt(_F);this.nlink=BigInt(1);this.rdev=BigInt(0);this.blocks=BigInt(1)}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&BigInt(61440))===BigInt(16384)}isFIFO(){return!1}isFile(){return(this.mode&BigInt(61440))===BigInt(32768)}isSocket(){return!1}isSymbolicLink(){return(this.mode&BigInt(61440))===BigInt(40960)}}});function w_e(t){let e,r;if(e=t.match(E_e))t=e[1];else if(r=t.match(C_e))t=\\\\${r[1]?".\\":""}${r[2]};else return t;return t.replace(///g,“\”)}function I_e(t){t=t.replace(/\/g,“/”);let e,r;return(e=t.match(m_e))?t=/${e[1]}:(r=t.match(y_e))&&(t=/unc/${r[1]?".dot/":""}${r[2]}),t}function DP(t,e){return t===ue?F7(e):GF(e)}var Hw,Bt,dr,ue,z,R7,m_e,y_e,E_e,C_e,GF,F7,Ca=Et(()=>{Hw=Ze(ve(“path”)),Bt={root:“/”,dot:“.”,parent:“…”},dr={home:“~”,nodeModules:“node_modules”,manifest:“package.json”,lockfile:“yarn.lock”,virtual:“virtual”,pnpJs:“.pnp.js”,pnpCjs:“.pnp.cjs”,pnpData:“.pnp.data.json”,pnpEsmLoader:“.pnp.loader.mjs”,rc:“.yarnrc.yml”,env:“.env”},ue=Object.create(Hw.default),z=Object.create(Hw.default.posix);ue.cwd=()=>process.cwd();z.cwd=process.platform===“win32”?()=>GF(process.cwd()):process.cwd;process.platform===“win32”&&(z.resolve=(…t)=>t.length>0&&z.isAbsolute(t[0])?Hw.default.posix.resolve(…t):Hw.default.posix.resolve(z.cwd(),…t));R7=function(t,e,r){return e=t.normalize(e),r=t.normalize(r),e===r?“.”:(e.endsWith(t.sep)||(e=e+t.sep),r.startsWith(e)?r.slice(e.length):null)};ue.contains=(t,e)=>R7(ue,t,e);z.contains=(t,e)=>R7(z,t,e);m_e=/^([a-zA-Z]:.)$/,y_e=/^//(./)?(.)$/,E_e=/^/([a-zA-Z]:.)$/,C_e=/^/unc/(.dot/)?(.)$/;GF=process.platform===“win32”?I_e:t=>t,F7=process.platform===“win32”?w_e:t=>t;ue.fromPortablePath=F7;ue.toPortablePath=GF});async function SP(t,e){let r=“0123456789abcdef”;await t.mkdirPromise(e.indexPath,{recursive:!0});let o=;for(let a of r)for(let n of r)o.push(t.mkdirPromise(t.pathUtils.join(e.indexPath,${a}${n}),{recursive:!0}));return await Promise.all(o),e.indexPath}async function T7(t,e,r,o,a){let n=t.pathUtils.normalize(e),u=r.pathUtils.normalize(o),A=,p=,{atime:h,mtime:E}=a.stableTime?{atime:Mg,mtime:Mg}:await r.lstatPromise(u);await t.mkdirpPromise(t.pathUtils.dirname(e),{utimes:[h,E]}),await jF(A,p,t,n,r,u,{…a,didParentExist:!0});for(let I of A)await I();await Promise.all(p.map(I=>I()))}async function jF(t,e,r,o,a,n,u){let A=u.didParentExist?await L7(r,o):null,p=await a.lstatPromise(n),{atime:h,mtime:E}=u.stableTime?{atime:Mg,mtime:Mg}:p,I;switch(!0){case p.isDirectory():I=await v_e(t,e,r,o,A,a,n,p,u);break;case p.isFile():I=await S_e(t,e,r,o,A,a,n,p,u);break;case p.isSymbolicLink():I=await b_e(t,e,r,o,A,a,n,p,u);break;default:throw new Error(Unsupported file type (${p.mode}))}return(u.linkStrategy?.type!==“HardlinkFromIndex”||!p.isFile())&&((I||A?.mtime?.getTime()!==E.getTime()||A?.atime?.getTime()!==h.getTime())&&(e.push(()=>r.lutimesPromise(o,h,E)),I=!0),(A===null||(A.mode&511)!==(p.mode&511))&&(e.push(()=>r.chmodPromise(o,p.mode&511)),I=!0)),I}async function L7(t,e){try{return await t.lstatPromise(e)}catch{return null}}async function v_e(t,e,r,o,a,n,u,A,p){if(a!==null&&!a.isDirectory())if(p.overwrite)t.push(async()=>r.removePromise(o)),a=null;else return!1;let h=!1;a===null&&(t.push(async()=>{try{await r.mkdirPromise(o,{mode:A.mode})}catch(v){if(v.code!==“EEXIST”)throw v}}),h=!0);let E=await n.readdirPromise(u),I=p.didParentExist&&!a?{…p,didParentExist:!1}:p;if(p.stableSort)for(let v of E.sort())await jF(t,e,r,r.pathUtils.join(o,v),n,n.pathUtils.join(u,v),I)&&(h=!0);else(await Promise.all(E.map(async x=>{await jF(t,e,r,r.pathUtils.join(o,x),n,n.pathUtils.join(u,x),I)}))).some(x=>x)&&(h=!0);return h}async function P_e(t,e,r,o,a,n,u,A,p,h){let E=await n.checksumFilePromise(u,{algorithm:“sha1”}),I=420,v=A.mode&511,x=${E}${v!==I?v.toString(8):""},C=r.pathUtils.join(h.indexPath,E.slice(0,2),${x}.dat),F;(ce=>(ce[ce.Lock=0]=“Lock”,ce[ce.Rename=1]=“Rename”))(F||={});let N=1,U=await L7(r,C);if(a){let le=U&&a.dev===U.dev&&a.ino===U.ino,ae=U?.mtimeMs!==B_e;if(le&&ae&&h.autoRepair&&(N=0,U=null),!le)if(p.overwrite)t.push(async()=>r.removePromise(o)),a=null;else return!1}let V=!U&&N===1?${C}.${Math.floor(Math.random()*4294967296).toString(16).padStart(8,"0")}:null,te=!1;return t.push(async()=>{if(!U&&(N===0&&await r.lockPromise(C,async()=>{let le=await n.readFilePromise(u);await r.writeFilePromise(C,le)}),N===1&&V)){let le=await n.readFilePromise(u);await r.writeFilePromise(V,le);try{await r.linkPromise(V,C)}catch(ae){if(ae.code===“EEXIST”)te=!0,await r.unlinkPromise(V);else throw ae}}a||await r.linkPromise(C,o)}),e.push(async()=>{U||(await r.lutimesPromise(C,Mg,Mg),v!==I&&await r.chmodPromise(C,v)),V&&!te&&await r.unlinkPromise(V)}),!1}async function D_e(t,e,r,o,a,n,u,A,p){if(a!==null)if(p.overwrite)t.push(async()=>r.removePromise(o)),a=null;else return!1;return t.push(async()=>{let h=await n.readFilePromise(u);await r.writeFilePromise(o,h)}),!0}async function S_e(t,e,r,o,a,n,u,A,p){return p.linkStrategy?.type===“HardlinkFromIndex”?P_e(t,e,r,o,a,n,u,A,p,p.linkStrategy):D_e(t,e,r,o,a,n,u,A,p)}async function b_e(t,e,r,o,a,n,u,A,p){if(a!==null)if(p.overwrite)t.push(async()=>r.removePromise(o)),a=null;else return!1;return t.push(async()=>{await r.symlinkPromise(DP(r.pathUtils,await n.readlinkPromise(u)),o)}),!0}var Mg,B_e,YF=Et(()=>{Ca();Mg=new Date(456789e31e3),B_e=Mg.getTime()});function bP(t,e,r,o){let a=()=>{let n=r.shift();if(typeof n>“u”)return null;let u=t.pathUtils.join(e,n);return Object.assign(t.statSync(u),{name:n,path:void 0})};return new qw(e,a,o)}var qw,N7=Et(()=>{vP();qw=class{constructor(e,r,o={}){this.path=e;this.nextDirent=r;this.opts=o;this.closed=!1}throwIfClosed(){if(this.closed)throw OF()}asyncSymbol.asyncIterator{try{let e;for(;(e=await this.read())!==null;)yield e}finally{await this.close()}}read(e){let r=this.readSync();return typeof e<“u”?e(null,r):Promise.resolve(r)}readSync(){return this.throwIfClosed(),this.nextDirent()}close(e){return this.closeSync(),typeof e<“u”?e(null):Promise.resolve()}closeSync(){this.throwIfClosed(),this.opts.onClose?.(),this.closed=!0}}});function O7(t,e){if(t!==e)throw new Error(Invalid StatWatcher status: expected '${e}', got '${t}')}var M7,ty,U7=Et(()=>{M7=ve(“events”);qF();ty=class extends M7.EventEmitter{constructor(r,o,{bigint:a=!1}={}){super();this.status=“ready”;this.changeListeners=new Map;this.startTimeout=null;this.fakeFs=r,this.path=o,this.bigint=a,this.lastStats=this.stat()}static create(r,o,a){let n=new ty(r,o,a);return n.start(),n}start(){O7(this.status,“ready”),this.status=“running”,this.startTimeout=setTimeout(()=>{this.startTimeout=null,this.fakeFs.existsSync(this.path)||this.emit(“change”,this.lastStats,this.lastStats)},3)}stop(){O7(this.status,“running”),this.status=“stopped”,this.startTimeout!==null&&(clearTimeout(this.startTimeout),this.startTimeout=null),this.emit(“stop”)}stat(){try{return this.fakeFs.statSync(this.path,{bigint:this.bigint})}catch{let o=this.bigint?new ey:new $m;return PP(o)}}makeInterval(r){let o=setInterval(()=>{let a=this.stat(),n=this.lastStats;HF(a,n)||(this.lastStats=a,this.emit(“change”,a,n))},r.interval);return r.persistent?o:o.unref()}registerChangeListener(r,o){this.addListener(“change”,r),this.changeListeners.set(r,this.makeInterval(o))}unregisterChangeListener(r){this.removeListener(“change”,r);let o=this.changeListeners.get(r);typeof o<“u”&&clearInterval(o),this.changeListeners.delete(r)}unregisterAllChangeListeners(){for(let r of this.changeListeners.keys())this.unregisterChangeListener(r)}hasChangeListeners(){return this.changeListeners.size>0}ref(){for(let r of this.changeListeners.values())r.ref();return this}unref(){for(let r of this.changeListeners.values())r.unref();return this}}});function ry(t,e,r,o){let a,n,u,A;switch(typeof r){case"function":a=!1,n=!0,u=5007,A=r;break;default:({bigint:a=!1,persistent:n=!0,interval:u=5007}=r),A=o;break}let p=xP.get(t);typeof p>“u”&&xP.set(t,p=new Map);let h=p.get(e);return typeof h>“u”&&(h=ty.create(t,e,{bigint:a}),p.set(e,h)),h.registerChangeListener(A,{persistent:n,interval:u}),h}function Ug(t,e,r){let o=xP.get(t);if(typeof o>“u”)return;let a=o.get(e);typeof a>“u”||(typeof r>“u”?a.unregisterAllChangeListeners():a.unregisterChangeListener(r),a.hasChangeListeners()||(a.stop(),o.delete(e)))}function _g(t){let e=xP.get(t);if(!(typeof e>“u”))for(let r of e.keys())Ug(t,r)}var xP,WF=Et(()=>{U7();xP=new WeakMap});function x_e(t){let e=t.match(/\r?\n/g);if(e===null)return H7.EOL;let r=e.filter(a=>a===`\r
0.284
0.284
0.284 SyntaxError: missing ) after argument list
0.284 at wrapSafe (internal/modules/cjs/loader.js:1029:16)
0.284 at Module._compile (internal/modules/cjs/loader.js:1078:27)
0.284 at Object.Module._extensions…js (internal/modules/cjs/loader.js:1143:10)
0.284 at Module.load (internal/modules/cjs/loader.js:979:32)
0.284 at Function.Module._load (internal/modules/cjs/loader.js:819:12)
0.284 at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)
0.284 at internal/main/run_main_module.js:17:47


Error: failed to fetch an image or build from source: error building: failed to solve: process “/bin/bash -c if [ -f "yarn.lock" ]; then yarn install; elif [ -f "package-lock.json" ]; then npm install; else mkdir node_modules; fi” did not complete successfully: exit code: 1

Node 14 was released in April of 2020, and ended support in April of 2023.

What I’m seeing in the traceback is a syntax error in yarn itself:

What is likely going on here is that the version of Yarn you are picking up depends on a newer version of node.

If your dockerfile was provided by us and you have not made other changes to it, the easiest and quickest way forward may be to have us create a new one for you.

try bundle update --source dockerfile-rails. If that doesn’t work, try bundle add dockerfile-rails. Once that completes:

bin/rails generate dockerfile

If, however, you want to keep your current Dockerfile, I’d need to see more to make specific recommendations; mostly what you should consider is updating to a newer version of node; either that or using an older version of yarn.

Thanks so much! I totally forgot to update the node version in my fly.toml file. It deployed fine after I fixed that.