Issue with packages/deploying
I can build and start the project fine locally, however when trying to deploy on railway I run into a error. I know that I am using a deprecated package however a package I'm using requires it and as I said it works locally. Here is the error
project id:
#12 19.29 npm ERR! code 1
#12 19.29 npm ERR! path /app/node_modules/phantomjs-prebuilt
#12 19.29 npm ERR! command failed
#12 19.29 npm ERR! command sh -c -- node install.js
#12 19.29 npm ERR! PhantomJS not found on PATH
#12 19.29 npm ERR! Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
#12 19.29 npm ERR! Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
#12 19.29 npm ERR! Receiving...
#12 19.29 npm ERR!
#12 19.29 npm ERR! Received 22866K total.
#12 19.29 npm ERR! Extracting tar contents (via spawned process)
#12 19.29 npm ERR! Error extracting archive
#12 19.29 npm ERR! Phantom installation failed Error: Command failed: tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
#12 19.29 npm ERR! tar (child): bzip2: Cannot exec: No such file or directory
#12 19.29 npm ERR! tar (child): Error is not recoverable: exiting now
#12 19.29 npm ERR! tar: Child returned status 2
#12 19.29 npm ERR! tar: Error is not recoverable: exiting now
#12 19.29 npm ERR!
#12 19.29 npm ERR! at ChildProcess.exithandler (node:child_process:402:12)
#12 19.29 npm ERR! at ChildProcess.emit (node:events:513:28)
#12 19.29 npm ERR! at maybeClose (node:internal/child_process:1100:16)
#12 19.29 npm ERR! at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5) {
#12 19.29 npm ERR! code: 2,
#12 19.29 npm ERR! killed: false,
#12 19.29 npm ERR! signal: null,
#12 19.29 npm ERR! cmd: 'tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2'
#12 19.29 npm ERR! } Error: Command failed: tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
#12 19.29 npm ERR! tar (child): bzip2: Cannot exec: No such file or directory
#12 19.29 npm ERR! tar (child): Error is not recoverable: exiting now
#12 19.29 npm ERR! tar: Child returned status 2
#12 19.29 npm ERR! tar: Error is not recoverable: exiting now
#12 19.29 npm ERR!
#12 19.29 npm ERR! at ChildProcess.exithandler (node:child_process:402:12)
#12 19.29 npm ERR! at ChildProcess.emit (node:events:513:28)
#12 19.29 npm ERR! at maybeClose (node:internal/child_process:1100:16)
#12 19.29 npm ERR! at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
#12 19.29
#12 19.29 npm ERR! A complete log of this run can be found in:
#12 19.29 npm ERR! /root/.npm/_logs/2023-05-12T02_32_42_668Z-debug-0.log
#12 ERROR: process "/bin/bash -ol pipefail -c npm ci" did not complete successfully: exit code: 1
#12 19.29 npm ERR! code 1
#12 19.29 npm ERR! path /app/node_modules/phantomjs-prebuilt
#12 19.29 npm ERR! command failed
#12 19.29 npm ERR! command sh -c -- node install.js
#12 19.29 npm ERR! PhantomJS not found on PATH
#12 19.29 npm ERR! Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
#12 19.29 npm ERR! Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
#12 19.29 npm ERR! Receiving...
#12 19.29 npm ERR!
#12 19.29 npm ERR! Received 22866K total.
#12 19.29 npm ERR! Extracting tar contents (via spawned process)
#12 19.29 npm ERR! Error extracting archive
#12 19.29 npm ERR! Phantom installation failed Error: Command failed: tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
#12 19.29 npm ERR! tar (child): bzip2: Cannot exec: No such file or directory
#12 19.29 npm ERR! tar (child): Error is not recoverable: exiting now
#12 19.29 npm ERR! tar: Child returned status 2
#12 19.29 npm ERR! tar: Error is not recoverable: exiting now
#12 19.29 npm ERR!
#12 19.29 npm ERR! at ChildProcess.exithandler (node:child_process:402:12)
#12 19.29 npm ERR! at ChildProcess.emit (node:events:513:28)
#12 19.29 npm ERR! at maybeClose (node:internal/child_process:1100:16)
#12 19.29 npm ERR! at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5) {
#12 19.29 npm ERR! code: 2,
#12 19.29 npm ERR! killed: false,
#12 19.29 npm ERR! signal: null,
#12 19.29 npm ERR! cmd: 'tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2'
#12 19.29 npm ERR! } Error: Command failed: tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
#12 19.29 npm ERR! tar (child): bzip2: Cannot exec: No such file or directory
#12 19.29 npm ERR! tar (child): Error is not recoverable: exiting now
#12 19.29 npm ERR! tar: Child returned status 2
#12 19.29 npm ERR! tar: Error is not recoverable: exiting now
#12 19.29 npm ERR!
#12 19.29 npm ERR! at ChildProcess.exithandler (node:child_process:402:12)
#12 19.29 npm ERR! at ChildProcess.emit (node:events:513:28)
#12 19.29 npm ERR! at maybeClose (node:internal/child_process:1100:16)
#12 19.29 npm ERR! at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
#12 19.29
#12 19.29 npm ERR! A complete log of this run can be found in:
#12 19.29 npm ERR! /root/.npm/_logs/2023-05-12T02_32_42_668Z-debug-0.log
#12 ERROR: process "/bin/bash -ol pipefail -c npm ci" did not complete successfully: exit code: 1
6dd7933f-9582-4303-b591-7060ba6cf2f3
4 Replies
Project ID:
6dd7933f-9582-4303-b591-7060ba6cf2f3
it looks it wants bzip2
add that as a nixpacks.toml file to your project
[phases.setup]
aptPkgs = ["...", "bzip2"]
[phases.setup]
aptPkgs = ["...", "bzip2"]
This seemed to of worked, thanks for the quick response
no problem!