2 years ago
I want to deploy a web-app (React & Vite) and I fail to deploy it. The deploy logs say the following:
npm WARN config production Use --omit=dev instead.
qv-bestehen@1.0.0 start tsc && cross-env NODE_OPTIONS=--max-old-space-size=16384 vite build --mode=production vite v5.0.11 building for production… transforming… (here crashes the build after several seconds). Every hint is highly appreciated. Thank you.
59 Replies
2 years ago
@Fragly I'm currently busy, would you have the time to help here?
2 years ago
I can try
2 years ago
Would you mind sharing your build logs using this link?
https://bookmarklets.up.railway.app/log-downloader/
2 years ago
It's almost 1 am for me, gonna hit the hay
2 years ago
<:gx_aightimaheadout:811578944323059744>
2 years ago
well you tried
Thank you very much, @Brody and @Fragly for your messages. Please find the logs on https://www.tutorat.ch/build.log and https://www.tutorat.ch/deployment.log
2 years ago
please send your package.json
For production, I used another proxy of course. My package.json is as follows:
{
"name": "qv-bestehen",
"private": true,
"version": "1.0.0",
"type": "module",
"proxy": "http://localhost:8000",
"scripts": {
"dev": "vite --host",
"build": "tsc && vite build",
"lint": "eslint qv-bestehen --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"backend": "nodemon backend/index.cjs --host",
"start": "tsc && cross-env NODE_OPTIONS=--max-old-space-size=16384 vite build --mode=production"
},
"dependencies": {
"@firebase/firestore": "^4.4.3",
"@railway/cli": "^3.5.2",
"@reduxjs/toolkit": "^2.1.0",
"bootstrap": "^5.3.2",
"classnames": "^2.5.1",
"cors": "^2.8.5",
"cross-env": "^7.0.3",
"dotenv": "^16.4.5",
"express": "^4.18.2",
"firebase": "^10.7.1",
"i18next": "^23.7.16",
"nodemailer": "^6.9.10",
"react": "^18.2.0",
"react-bootstrap": "^2.9.2",
"react-bootstrap-icons": "^1.10.3",
"react-dom": "^18.2.0",
"react-i18next": "^14.0.0",
"react-redux": "^9.1.0",
"react-router-dom": "^6.21.2"
},
"devDependencies": {
"@types/react": "^18.2.43",
"@types/react-dom": "^18.2.17",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"@vitejs/plugin-react": "^4.2.1",
"eslint": "^8.55.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"nodemon": "^3.0.3",
"prettier": "^3.2.1",
"typescript": "^5.3.3",
"vite": "^5.0.8"
}
}
2 years ago
using a proxy is just a bandaid solution for local development, it is far from the most ideal way to work on local frontend and backend development and very often causes issues when deploying into a production environment such as railway, it's not your main issue, but it's one of several issues.
2 years ago
so let's work through everything so we can get you setup for easy deployments to railway!
2 years ago
first please go and disconnect your repository from your service via it's settings page
OK, thank you for your message. I uninstall the Railway App from my Github repo.
2 years ago
sorry, that is not what I meant
2 years ago
please do not do that
2 years ago
disconnect your github repository from your railway service via the services settings page
2 years ago
for context this has nothing to do with the railway github bot
OK, within the https://railway.app/account I disconnected within the "Account Integrations". I hope this is what you meant.
2 years ago
that's also not what I meant, I felt like I was quite clear here, what is left unclear exactly?
Ok, I will revert it. Since I am new in this topic, I may need closer assistance. Sorry for that.
2 years ago
please help me to understand what is left unclear
2 years ago
open the service
2 years ago
going forward if you are unsure about something i say, please ask instead of going and doing something potentially undesired again
OK, understood. I don't find the "service" within the railway app dashboard. I'm not normally so slow on the uptake but here I am on the fence, sorry.
2 years ago
starting from
open your desired project, open your desired service, click on its settings tab, click on the disconnect button besides the github repository
2 years ago
have you since reinstalled the railway github bot and linked your github account back to your railway account?
2 years ago
would it be possible for you to share your github repository with me?
I made it temporarily public: https://github.com/lkerbage/qv-bestehen
2 years ago
lots to unpack here
2 years ago
lets start with just a screenshot of your railway project
2 years ago
what part of my message needs clarification? what a screenshot is or what a railway project is?
2 years ago
i would like a screenshot of the project canvas
2 years ago
starting from
open your desired project, take a screenshot, send screenshot to me
I need to go and I will be back tomorrow. Thank you very much for your time and your patience so far.
2 years ago
yes that what i wanted, but i noticed you have your github repository is still attached, i had previously asked you to disconnect it
2 years ago
okay good, can you make your repo public again?
2 years ago
we have spent quite the amount of time finishing only step one of disconnecting the repo from the service, so in the interest of efficient time usage, what do you think of adding me to your github repo and your railway project so i can go ahead and get this all setup for you?
2 years ago
okay, please add me to your railway project too, my email is brodyover@gmail.com
2 years ago
okay ill go ahead and make the needed changes, please ignore any errors while i get things worked out
2 years ago
looks like you are setup, you will still likely have some code stuff to figure out, like using the correct url paths and what not, on account of the backend and frontend being separate services since this is the correct way to set this app up
Thank you, Brody! Could you give me any suggestions on how to improve my design and architecture, respectively?
2 years ago
I would have personally gone for a isolated monorepo, but if this works for you then you're fine
7 months ago
My app building successfully build but when trying to deploy that time giving error:
Starting Container
npm error code ENOENT
npm error syscall open
npm error path /app/package.json
npm error errno -2
npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '/app/package.json'
npm error enoent This is related to npm not being able to find a file.
npm error enoent
npm error A complete log of this run can be found in: /root/.npm/_logs/2025-07-30T05_11_35_931Z-debug-0.log
Can you help me here?



