Error on fly deploy for Rails app : ERROR [base 5/5] ... #0 0.735 node-build: definition not found: lts

Hello,

I can’t deploy my really basic Rails app because I have this error : #0 0.735 node-build: definition not found: lts when the script is executing : RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ && /tmp/node-build-master/bin/node-build "lts" /usr/local/node && rm -rf /tmp/node-build-master

I am just trying to do $ fly deploy as recommended

Here is the full output
Thanks a lot!

==> Verifying app config
Validating /Users/macbookpro/Documents/Projects/Pennylane/recipe-finder/fly.toml
Platform: machines
✓ Configuration is valid
--> Verified app config
==> Building image
Remote builder fly-builder-wispy-snowflake-6278 ready
==> Building image with Docker
--> docker host: 20.10.12 linux x86_64
[+] Building 1.7s (13/23)                                                                                                                                                                                                                     
 => [internal] load build definition from Dockerfile                                                                                                                                                                                     0.0s
 => => transferring dockerfile: 32B                                                                                                                                                                                                      0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                        0.0s
 => => transferring context: 35B                                                                                                                                                                                                         0.0s
 => resolve image config for docker.io/docker/dockerfile:1                                                                                                                                                                               0.6s
 => CACHED docker-image://docker.io/docker/dockerfile:1@sha256:ac85f380a63b13dfcefa89046420e1781752bab202122f8f50032edf31be0021                                                                                                          0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                                                     0.0s
 => [internal] load metadata for docker.io/library/ruby:3.2.2-slim                                                                                                                                                                       0.2s
 => [internal] load .dockerignore                                                                                                                                                                                                        0.0s
 => [base 1/5] FROM docker.io/library/ruby:3.2.2-slim@sha256:9654f1d43acae3032456fa89381076d3b997ea35d53259cf78a7db65b2e2121e                                                                                                            0.0s
 => [internal] load build context                                                                                                                                                                                                        0.0s
 => => transferring context: 5.97kB                                                                                                                                                                                                      0.0s
 => CACHED [base 2/5] WORKDIR /rails                                                                                                                                                                                                     0.0s
 => CACHED [base 3/5] RUN gem update --system --no-document &&     gem install -N bundler                                                                                                                                                0.0s
 => CACHED [base 4/5] RUN apt-get update -qq &&     apt-get install --no-install-recommends -y curl &&     rm -rf /var/lib/apt/lists /var/cache/apt/archives                                                                             0.0s
 => ERROR [base 5/5] RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ &&     /tmp/node-build-master/bin/node-build "lts" /usr/local/node &&     rm -rf /tmp/node-build-master                   0.8s
------                                                                                                                                                                                                                                        
 > [base 5/5] RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ &&     /tmp/node-build-master/bin/node-build "lts" /usr/local/node &&     rm -rf /tmp/node-build-master:
#0 0.735 node-build: definition not found: lts
------
Error: failed to fetch an image or build from source: error building: failed to solve: executor failed running [/bin/sh -c curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ &&     /tmp/node-build-master/bin/node-build "${NODE_VERSION}" /usr/local/node &&     rm -rf /tmp/node-build-master]: exit code: 2

Do you have node installed on your machine? Try:

node -v

If not, can you install node, and then run:

bin/rails generate dockerfile
``

It was indeed a problem with node ! Thanks for your advice :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.