Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build is failing on Github Actions. #114

Closed
vivekimsit opened this issue Aug 31, 2022 · 6 comments
Closed

Build is failing on Github Actions. #114

vivekimsit opened this issue Aug 31, 2022 · 6 comments

Comments

@vivekimsit
Copy link

Have you experienced this bug with the latest version of the template?

Yes

Steps to Reproduce

  1. Push the code to dev branch.
  2. All the steps passes except the Build step.

#8 [deps 2/3] ADD package.json package-lock.json .npmrc ./
#8 ERROR: failed to calculate checksum of ref kne0msd6uexyjrhi1dqwby7iz::uk0c4v8ukx8dm5nuk4vhr6cr7: "/package-lock.json": not found

#9 [build 2/6] COPY --from=deps /myapp/node_modules /myapp/node_modules
#9 CACHED

#10 [deps 3/3] RUN npm install --production=false
#10 CACHED

#11 [production-deps 3/4] ADD package.json package-lock.json .npmrc ./
#11 ERROR: failed to calculate checksum of ref kne0msd6uexyjrhi1dqwby7iz::uk0c4v8ukx8dm5nuk4vhr6cr7: "/package-lock.json": not found

#12 [base 2/2] RUN apt-get update && apt-get install -y openssl
#12 CANCELED
------
 > [deps 2/3] ADD package.json package-lock.json .npmrc ./:
------
------
 > [production-deps 3/4] ADD package.json package-lock.json .npmrc ./:
------
WARNING: local cache import at /tmp/.buildx-cache not found due to err: could not read /tmp/.buildx-cache/index.json: open /tmp/.buildx-cache/index.json: no such file or directory
Dockerfile:15
--------------------
  13 |     WORKDIR /myapp
  14 |     
  15 | >>> ADD package.json package-lock.json .npmrc ./
  16 |     RUN npm install --production=false
  17 |     
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref kne0msd6uexyjrhi1dqwby7iz::uk0c4v8ukx8dm5nuk4vhr6cr7: "/package-lock.json": not found
Error: buildx failed with: ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref kne0msd6uexyjrhi1dqwby7iz::uk0c4v8ukx8dm5nuk4vhr6cr7: "/package-lock.json": not found

Expected Behavior

Expect the build to pass.

Actual Behavior

Build is failing.

@mcansh
Copy link
Contributor

mcansh commented Aug 31, 2022

do you have a package-lock.json?

@vivekimsit
Copy link
Author

I managed to check in package-lock.json manually but it now fails with 404 not found.

@mcansh
Copy link
Contributor

mcansh commented Sep 1, 2022

did you create an app on fly and does it match what's in fly.toml?

@vivekimsit
Copy link
Author

I think there is a limit on number of fly instanced in free tier. It seems I cannot have both app and app-staging both in free tier as I need to have db instance as well. I have only app-staging and not app and I am trying to deploy to dev.

@vivekimsit
Copy link
Author

I cleaned up everything, created new app and db from scratch but the deployment is still failing with new errors:

2022-09-02T04:25:27.699 app[782a03cf] sin [info] Starting init (commit: 249766e)...

2022-09-02T04:25:27.713 app[782a03cf] sin [info] Preparing to run: `docker-entrypoint.sh npm start` as root

2022-09-02T04:25:27.727 app[782a03cf] sin [info] 2022/09/02 04:25:27 listening on [fdaa:0:90ed:a7b:a754:782a:3cf:2]:22 (DNS: [fdaa::3]:53)

2022-09-02T04:25:28.205 app[782a03cf] sin [info] > start

2022-09-02T04:25:28.205 app[782a03cf] sin [info] > cross-env NODE_ENV=production node ./build/server.js

2022-09-02T04:25:28.511 app[782a03cf] sin [info] 🔌 setting up prisma client to sin.top2.nearest.of.dnb-db.internal:5432

2022-09-02T04:25:28.527 app[782a03cf] sin [info] /myapp/node_modules/tiny-invariant/dist/tiny-invariant.cjs.js:10

2022-09-02T04:25:28.527 app[782a03cf] sin [info] throw new Error(prefix);

2022-09-02T04:25:28.527 app[782a03cf] sin [info] ^

2022-09-02T04:25:28.527 app[782a03cf] sin [info] Error: Invariant failed

2022-09-02T04:25:28.527 app[782a03cf] sin [info] at invariant (/myapp/node_modules/tiny-invariant/dist/tiny-invariant.cjs.js:10:15)

2022-09-02T04:25:28.527 app[782a03cf] sin [info] at Object.<anonymous> (/myapp/build/index.js:138:36)

2022-09-02T04:25:28.527 app[782a03cf] sin [info] at Module._compile (node:internal/modules/cjs/loader:1126:14)

2022-09-02T04:25:28.527 app[782a03cf] sin [info] at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)

2022-09-02T04:25:28.527 app[782a03cf] sin [info] at Module.load (node:internal/modules/cjs/loader:1004:32)

2022-09-02T04:25:28.527 app[782a03cf] sin [info] at Function.Module._load (node:internal/modules/cjs/loader:839:12)

2022-09-02T04:25:28.527 app[782a03cf] sin [info] at Module.require (node:internal/modules/cjs/loader:1028:19)

2022-09-02T04:25:28.527 app[782a03cf] sin [info] at require (node:internal/modules/cjs/helpers:102:18)

2022-09-02T04:25:28.527 app[782a03cf] sin [info] at Object.<anonymous> (/myapp/build/server.js:41700:78)

2022-09-02T04:25:28.527 app[782a03cf] sin [info] at Module._compile (node:internal/modules/cjs/loader:1126:14)

2022-09-02T04:25:30.724 app[782a03cf] sin [info] Starting clean up.

@mcansh
Copy link
Contributor

mcansh commented Sep 29, 2022

sorry for the delay @vivekimsit

2022-09-02T04:25:28.527 app[782a03cf] sin [info] Error: Invariant failed

means you're missing a secret on fly, the DATABASE_URL should be handled automatically by fly, but you'll need to set a SESSION_SECRET manually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants