run fly launch in my express backend app and throw a error

 => CACHED [base 2/2] WORKDIR /app                                                      0.0s
 => CACHED [build 1/6] RUN apt-get update -qq &&     apt-get install --no-install-reco  0.0s
 => ERROR [build 2/6] COPY --link package-lock.json package.json ./                     0.0s
------
 > [build 2/6] COPY --link package-lock.json package.json ./:
------
Error: failed to fetch an image or build from source: error building: failed to solve: failed to compute cache key: failed to calculate checksum of ref e2ad17f7-62a3-44e9-8b5d-f43f1065b9b9::tn9pm1yv4o7slopp5e3bwt5no: "/package-lock.json": not found

Hi,

Based on that error message mentioning package-lock.json not being found … are you able to share the Dockerfile for the app?

If you had not already made one to “containerize” the app (to make an image) the Fly CLI may have added one as part of the launch command.

That should show what it was doing prior to those summary few lines. Normally what happens during the build is it would run npm install (or equivalent) to install dependencies, and doing that would create/update a package-lock.json file. For some reason that doesn’t seem to have happened.

Thanks for you response, it works now, after remove package-lock.json from .dockerignore!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.