#angular 21.1.2 node used is v24.1.0 build fails

25 messages · Page 1 of 1 (latest)

grave perch
#

Project ID: 5c70c098-1cf0-43a3-8216-6d4a673bfce2

I have a reicent build angular app but when I push it railway fails to build it, how can I get it to work?

Thanks in advance.

Package json:
{
"name": "lanhsahn-sis",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"prettier": {
"printWidth": 100,
"singleQuote": true,
"overrides": [
{
"files": "*.html",
"options": {
"parser": "angular"
}
}
]
},
"private": true,
"packageManager": "[email protected]",
"dependencies": {
"@angular/animations": "^21.1.2",
"@angular/cdk": "~21.1.2",
"@angular/common": "^21.1.0",
"@angular/compiler": "^21.1.0",
"@angular/core": "^21.1.0",
"@angular/forms": "^21.1.0",
"@angular/material": "~21.1.2",
"@angular/material-moment-adapter": "^21.1.2",
"@angular/platform-browser": "^21.1.0",
"@angular/router": "^21.1.0",
"angular2-notifications": "^16.0.1",
"moment": "^2.30.1",
"ngx-cookie-service": "^21.1.0",
"ngx-flexible-layout": "^21.0.0",
"ngxsmk-datepicker": "^2.0.7",
"rxjs": "~7.8.0",
"tslib": "^2.3.0"
},
"devDependencies": {
"@angular/build": "^21.1.2",
"@angular/cli": "^21.1.2",
"@angular/compiler-cli": "^21.1.0",
"jsdom": "^27.1.0",
"typescript": "~5.9.2",
"vitest": "^4.0.8"
}
}

pine osprey
grave perch
#

Nixpacks

pine osprey
# grave perch Nixpacks

Could you switch to Railpack? Nixpacks is deprecated

You can change the Node version using the RAILPACK_NODE_VERSION env variable
In your case 22 should work

grave perch
#

Made the changes you asked and got a new error:

copy /app/browser
0ms
ERROR: failed to build: failed to solve: failed to compute cache key: failed to calculate checksum of ref y1pgn8pxd568xbja5xn91zoyk::w1xsba7b24bhjtku3fy42w143: "/app/browser": not found

This is my first time using railpack I really don't know what to expect

pine osprey
grave perch
#

Faild again, error:

stage-0
RUN npm install --legacy-peer-deps && npm run build
2s
npm warn config production Use --omit=dev instead.
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE package: '@angular-devkit/[email protected]',
npm warn EBADENGINE required: {
npm warn EBADENGINE node: '^20.19.0 || ^22.12.0 || >=24.0.0',
npm warn EBADENGINE npm: '^6.11.0 || ^7.5.6 || >=8.0.0',
npm warn EBADENGINE yarn: '>= 1.13.0'
npm warn EBADENGINE },
npm warn EBADENGINE current: { node: 'v22.11.0', npm: '10.9.0' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE package: '@angular-devkit/[email protected]',
npm warn EBADENGINE required: {
npm warn EBADENGINE node: '^20.19.0 || ^22.12.0 || >=24.0.0',
npm warn EBADENGINE npm: '^6.11.0 || ^7.5.6 || >=8.0.0',
npm warn EBADENGINE yarn: '>= 1.13.0'
npm warn EBADENGINE },

pine osprey
#

Slightly unfortunate, NIXPACKS_NODE_VERSION to 22.12

grave perch
#

Faild again:

grave perch
#

NIXPACKS_NODE_VERSION set to 23, went back to node v18

pine osprey
#

I'm at a loss then

astral bone
pine osprey
grave perch
astral bone
#

I can't, but the community can!

stoic heartBOT
#

New reply sent from Central Station thread:

Just help the user. If you solve their problem, they will mark your message as the answer. Then, an admin will review it, and you will be awarded the bounty.

You're seeing this because this thread has been automatically linked to the Central Station thread.

stoic heartBOT
stoic heartBOT
#

New reply sent from Central Station thread:

Since you got the error
"/app/browser": not found
when you switched to
Railpack
, you can try to solve it by modifying your
angular.json
file to change the
outputPath
of the build.
Switch back to
Railpack
and try this one:
{
"projects": {
"lanhsahn-sis": {
"architect": {
"build": {
"options": {
"outputPath": "."
}
}
}
}
}
}
Try to change it to just
browser
if it doesn't work, or whatever base folder corresponds to
/app/browser
.

You're seeing this because this thread has been automatically linked to the Central Station thread.

#

New reply sent from Central Station thread:

In this case, change the outputPath to
"."
. This way Angular will create the
browser
folder in your project root. You will need to add
browser
to
.gitignore
so you don't push build outputs to your repo.

You're seeing this because this thread has been automatically linked to the Central Station thread.

#

New reply sent from Central Station thread:

The image you provided shows that you haven't changed the outputPath to
"."
!

You're seeing this because this thread has been automatically linked to the Central Station thread.

stoic heartBOT
#

New reply sent from Central Station thread:

If changing the outputPath doesn't work, keep it as it was, and try setting
RAILPACK_BUILD_CMD
to
npm run build && mv dist/lanhsahn-sis/browser .
in your environment variables.

You're seeing this because this thread has been automatically linked to the Central Station thread.