Hi! I’m new to fly.io and I’m trying to deploy Strapi but I receive this error every time:
Sending build context to Docker daemon 9.489kB [+] Building 1.3s (8/11) => CACHED [internal] load remote build context 0.0s => CACHED copy /context / 0.0s => [internal] load metadata for docker.io/library/node:16 0.2s => [1/8] FROM docker.io/library/node:16@sha256:1bbd8b82f5a78b6461d3285b62293db99ad60cf4eca35c715636d7143abb057 0.0s => CACHED [2/8] RUN apt-get update && apt-get install libvips-dev -y 0.0s => CACHED [3/8] WORKDIR /opt/ 0.0s => CACHED [4/8] COPY ./package.json ./package-lock.json 0.0s => ERROR [5/8] RUN npm install 1.0s ------ > [5/8] RUN npm install: #8 0.706 npm WARN ancient lockfile #8 0.706 npm WARN ancient lockfile The package-lock.json file was created with an old version of npm, #8 0.706 npm WARN ancient lockfile so supplemental metadata must be fetched from the registry. #8 0.706 npm WARN ancient lockfile #8 0.706 npm WARN ancient lockfile This is a one-time fix-up, please be patient... #8 0.706 npm WARN ancient lockfile #8 0.982 npm notice #8 0.983 npm notice New major version of npm available! 8.19.3 -> 9.2.0 #8 0.983 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.2.0> #8 0.983 npm notice Run `npm install -g email@example.com` to update! #8 0.983 npm notice #8 0.983 npm ERR! code ENOENT #8 0.984 npm ERR! syscall open #8 0.984 npm ERR! path /opt/package.json #8 0.984 npm ERR! errno -2 #8 0.986 npm ERR! enoent ENOENT: no such file or directory, open '/opt/package.json' #8 0.987 npm ERR! enoent This is related to npm not being able to find a file. #8 0.987 npm ERR! enoent #8 0.988 #8 0.988 npm ERR! A complete log of this run can be found in: #8 0.988 npm ERR! /root/.npm/_logs/2022-12-21T11_32_07_232Z-debug-0.log ------ Error failed to fetch an image or build from source: error building: executor failed running [/bin/sh -c npm install]: exit code: 254
I’ve tried to update my npm, create a new package.json file, deleted my fly-builder but nothing seems to work and I also couldn’t find other people with the same problem.