singlelink-co / Singlelink

The open-source Linktree alternative.
https://singlelink.co
GNU General Public License v3.0
550 stars 117 forks source link

Build issue on Railway - package.json #232

Closed tramcrazy closed 2 years ago

tramcrazy commented 2 years ago

I've tried to deploy Singlelink to Railway, but the build fails, with these logs:

Digest: sha256:f772128e21f6e5d581d15a71bbdb4b73b4cf66ae9c301c86f8d9761072f4b446
Status: Image is up to date for heroku/buildpacks:20
==========================
Using Buildpacks!
==========================
heroku/nodejs-engine 0.7.5
heroku/nodejs-npm    0.4.5
heroku/procfile      0.6.2
Downloading and extracting Node v16.14.2
===> RESTORING
===> BUILDING
Node.js Buildpack
Installing toolbox
- yj
===> ANALYZING
[Installing Node]
Getting Node version
Previous image with name "us-west1-docker.pkg.dev/railway-infra/railway-docker-users/project/edab5b64-dc50-404a-aa63-8a7329dc5766/service/15c45cf8-f835-4692-a24f-6c2f6aeab358:fdd1c718-55da-4af9-b49d-1b6757d22dfd" not found
Resolving Node version
===> DETECTING
20: Pulling from heroku/pack
Digest: sha256:ccb8975f8af91b976343839fa4e93c6a0e32d41424ddc6f7f9e2c9ed9a56f554
Status: Image is up to date for heroku/pack:20
Setting NODE_ENV to production
[Parsing package.json]
Parsing package.json
No file to start server
either use 'docker run' to start container or add index.js or server.js
Using npm v8.5.0 from Node
Installing node modules from ./package-lock.json
npm WARN old lockfile
npm
WARN old lockfile The package-lock.json file was created with an old version of npm,
npm
WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN
old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm notice
npm notice New patch version of npm available! 8.5.0 -> 8.5.5
npm notice Changelog: <[https://github.com/npm/cli/releases/tag/v8.5.5>](https://github.com/npm/cli/releases/tag/v8.5.5%3E);
npm notice Run `npm install -g npm@8.5.5` to update!
npm notice
npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
npm ERR!
npm ERR! Invalid: lock file's graphql@15.7.2 does not satisfy graphql@15.8.0
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/heroku/.npm/_logs/2022-03-21T16_32_09_069Z-debug-0.log
ERROR: failed to build: exit status 1
ERROR: failed to build: executing lifecycle: failed with status code: 51

It seems like the package.json/package-lock.json are out of sync?? I just used the 1-click deployment button and filled in the env vars.

isolume commented 2 years ago

Until an actual update to resolve this issue comes out, I would recommend going into the git repo created by Railway, and editing package.json from:

"graphql": "^15.8.0",

to:

"graphql": "^15.7.2",
tramcrazy commented 2 years ago

In the end I just deleted package-lock, npm regenerated it, and it worked fine.

Jonathan Baker - Chat @ Spike [1h4z09]

On March 21, 2022 at 19:44 GMT, nerd @.***> wrote:

Until an actual update to resolve this issue comes out, I would recommend going into the git repo created by Railway, and editing package.json from: "graphql": "^15.8.0",

to: "graphql": "^15.7.2",

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

jimmybisenius commented 2 years ago

Fixed - thank you @n3rd3x3 !