Giter Site home page Giter Site logo

Comments (10)

Milo123459 avatar Milo123459 commented on July 25, 2024

Do you have a lockfile? If not, please generate one with npm i.

from nixpacks.

anuaimi avatar anuaimi commented on July 25, 2024

doesn't the example node project already have a lockfile. also, this command worked when run on my Mac.

from nixpacks.

anuaimi avatar anuaimi commented on July 25, 2024

this is what the example project has

gitpod /workspace/nixpacks (main) $ ls examples/node
index.js  package.json  package-lock.json

from nixpacks.

aleksrutins avatar aleksrutins commented on July 25, 2024

Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.

Looks like there was trouble starting a thread in V8. I don't know why that would be, though, unless Gitpod has a limit on running threads (?), which I can't find mention of in their pricing.

from nixpacks.

 avatar commented on July 25, 2024

Looks like there was trouble starting a thread in V8. I don't know why that would be, though, unless Gitpod has a limit on running threads (?), which I can't find mention of in their pricing.

Building the generated Dockerfile fails too.

Generated Dockerfile for node-main-file example
FROM debian:bullseye-slim

RUN apt-get update && apt-get -y upgrade \
  && apt-get install --no-install-recommends -y locales curl xz-utils ca-certificates openssl \
  && apt-get clean && rm -rf /var/lib/apt/lists/* \
  && mkdir -m 0755 /nix && mkdir -m 0755 /etc/nix && groupadd -r nixbld && chown root /nix \
  && echo 'sandbox = false' > /etc/nix/nix.conf \
  && for n in $(seq 1 10); do useradd -c "Nix build user $n" -d /var/empty -g nixbld -G nixbld -M -N -r -s "$(command -v nologin)" "nixbld$n"; done

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN set -o pipefail && curl -L https://nixos.org/nix/install | bash \
    && /nix/var/nix/profiles/default/bin/nix-collect-garbage --delete-old

ENV \
  ENV=/etc/profile \
  USER=root \
  PATH=/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/bin:/sbin:/usr/bin:/usr/sbin \
  GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt \
  NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt \
  NIX_PATH=/nix/var/nix/profiles/per-user/root/channels

RUN nix-channel --update

RUN mkdir /app/
WORKDIR /app/

# Setup
COPY environment.nix /app/
RUN nix-env -if environment.nix

# Load environment variables
ARG NPM_CONFIG_PRODUCTION NODE_ENV
ENV NPM_CONFIG_PRODUCTION=$NPM_CONFIG_PRODUCTION NODE_ENV=$NODE_ENV

# Install
COPY . /app/
RUN npm install


# Build



# Start

CMD node src/index.js
ulimit logs for Container(Layer 13)
time(seconds)        unlimited
file(blocks)         unlimited
data(kbytes)         unlimited
stack(kbytes)        8192
coredump(blocks)     unlimited
memory(kbytes)       unlimited
locked memory(kbytes) 8192
process              unlimited
nofiles              1048576
vmemory(kbytes)      unlimited
locks                unlimited
rtprio               0
ulimit logs for Gitpod
tcore file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 256966
max locked memory       (kbytes, -l) 8192
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1048576
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 1024
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

from nixpacks.

 avatar commented on July 25, 2024

Related NixOS/nixpkgs#170279

from nixpacks.

anuaimi avatar anuaimi commented on July 25, 2024

I think @wyzlle is on the right track. If I have a standard Dockerfile, I can build the image in gitpod. But the one that nixpacks generates using nix for packaging fails. Also, I tried the go and python examples and they also fail under gitpod.

from nixpacks.

anuaimi avatar anuaimi commented on July 25, 2024

Anyone had a chance to look at this? I have worked with gitpod and they believe it has to do with the way that nix is installed. One thing I noticed is that nix is installed as root. The docs recommend not to do this.

from nixpacks.

JakeCooper avatar JakeCooper commented on July 25, 2024

Anyone had a chance to look at this? I have worked with gitpod and they believe it has to do with the way that nix is installed. One thing I noticed is that nix is installed as root. The docs recommend not to do this.

If you can reproduce that using nix via root causes this, and using it via not root fixes it, we'd be happy to fix that

Beyond that, we're a bit limited on bandwidth ATM but you're welcome to take a crack at it yourself, or have one of the Gitpod people do jump into it

from nixpacks.

coffee-cup avatar coffee-cup commented on July 25, 2024

Closing for inactivity. We do also have a devcontainer setup in the Nixpacks repo that a few users use https://github.com/railwayapp/nixpacks/tree/main/.devcontainer

from nixpacks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.