R
Railway•4w ago
Rose

Unable to build client side of CRUD app.

Good Evening, I hope everyone is well. I'm new to deploying to railway and fullstack and I'm stuck on deploying a CRUD app. This is what I have so far, any help would be greatly appreciated. My project id is : 66f997fc-fd5a-467c-a115-93b1badaf202 App is divided into two parts the api and client.
API : https://fullstackapp-production-36a6.up.railway.app/ Client : should be https://client-production-cf5a.up.railway.app Added the client (The log for the client is attached ) . When I deployed it I got an error that says
- UndefinedVar: Usage of undefined variable '$NIXPACKS_PATH' (line 18) LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 18) I have no idea what this means and I'm a bit new at this so I apologize if I ask alot of questions. Thank you very much for your help and your patience.
42 Replies
Percy
Percy•4w ago
Project ID: 66f997fc-fd5a-467c-a115-93b1badaf202
Fragly
Fragly•4w ago
Hey, the error you mentioned is just a warning and won't effect anything, I took a look at your build logs and it seems your error is:
#10 2.141 npm ERR!
code EUSAGE
#10 2.145 npm ERR!
#10 2.145 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.
#10 2.145 npm ERR!
#10 2.145 npm ERR! Invalid: lock file's typescript@5.5.2 does not satisfy typescript@4.9.5
#10 2.145 npm ERR!
#10 2.145 npm ERR! Clean install a project
#10 2.141 npm ERR!
code EUSAGE
#10 2.145 npm ERR!
#10 2.145 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.
#10 2.145 npm ERR!
#10 2.145 npm ERR! Invalid: lock file's typescript@5.5.2 does not satisfy typescript@4.9.5
#10 2.145 npm ERR!
#10 2.145 npm ERR! Clean install a project
Essentially, you just need to resynchronize your lockfile, which you can do by running npm install and then committing again
Rose
Rose•4w ago
@Fragly okay.. I'll do that.. thank you @Fragly I just need to reinsall react again on the client side?
Fragly
Fragly•4w ago
You just need to run npm install on your side to resync the the package-lock file Also if you're using react app then I'd recommend you copy the Caddyfile and nixpacks.toml from this repo by Brody into your repo: https://github.com/brody192/create-react-app-starter ( or if you're using vite then just do the same with https://github.com/brody192/vite-react-template ) This just ensures you're running it properly on Railway
Rose
Rose•4w ago
@Fragly Thank you for assisting me, with the project. I removed package-lock.json and it was able to deploy. But when I typed npm install to create a new package-lock.json and pushed a new version it failed. Also should I create a new thread
Fragly
Fragly•4w ago
We can keep going in this thread, can you share your build logs?
Rose
Rose•4w ago
sure..give me one moment sorry to bother you on this
Fragly
Fragly•4w ago
no worries!
Fragly
Fragly•4w ago
It's still not synchronized D: this time it's even more unsynchronized cause there's a whole dependency missing too now
Rose
Rose•4w ago
awww nooo how do you see it
Fragly
Fragly•4w ago
If you did run npm install and then didn't change anything in your package.json afterwards which may have lead to it losing synchronization again then I'm wondering if you're not perhaps gitignoring the lockfile and github is now just storing a super duper outdated lockfile 🤔 in your build logs:
#11 2.359 npm ERR!
code EUSAGE
#11 2.365 npm ERR!
#11 2.365 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.
#11 2.365 npm ERR!
#11 2.365 npm ERR! Missing: fsevents@2.3.3 from lock file
#11 2.365 npm ERR! Invalid: lock file's typescript@5.5.2 does not satisfy typescript@4.9.5
#11 2.365 npm ERR!
#11 2.365 npm ERR! Clean install a project
#11 2.365 npm ERR!
#11 2.365 npm ERR! Usage:
#11 2.365 npm ERR! npm ci
#11 2.365 npm ERR!
#11 2.359 npm ERR!
code EUSAGE
#11 2.365 npm ERR!
#11 2.365 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.
#11 2.365 npm ERR!
#11 2.365 npm ERR! Missing: fsevents@2.3.3 from lock file
#11 2.365 npm ERR! Invalid: lock file's typescript@5.5.2 does not satisfy typescript@4.9.5
#11 2.365 npm ERR!
#11 2.365 npm ERR! Clean install a project
#11 2.365 npm ERR!
#11 2.365 npm ERR! Usage:
#11 2.365 npm ERR! npm ci
#11 2.365 npm ERR!
Rose
Rose•4w ago
i do have a .gitignore in my client folder
Fragly
Fragly•4w ago
is it set to ignore the lockfile?
Rose
Rose•4w ago
GitHub
GitHub - rdelva/fullstack_app: A school database not real which u...
A school database not real which users can create and view courses. Built with a REST API, React and Express - rdelva/fullstack_app
Want results from more Discord servers?
Add your server