Giter VIP home page Giter VIP logo

Comments (9)

vweevers avatar vweevers commented on May 20, 2024 1

@mahnunchik Please open a new issue with details and a way to reproduce.

from classic-level.

mahnunchik avatar mahnunchik commented on May 20, 2024
0 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
1 info using [email protected]
2 info using [email protected]
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 1ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:/usr/src/app/.npmrc Completed in 0ms
10 timing config:load:project Completed in 6ms
11 timing config:load:file:/root/.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 1ms
16 timing config:load:credentials Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 12ms
19 timing npm:load:configload Completed in 12ms
20 timing npm:load:setTitle Completed in 0ms
21 timing config:load:flatten Completed in 2ms
22 timing npm:load:display Completed in 3ms
23 verbose logfile /root/.npm/_logs/2022-05-26T19_40_15_807Z-debug-0.log
24 timing npm:load:logFile Completed in 3ms
25 timing npm:load:timers Completed in 0ms
26 timing npm:load:configScope Completed in 0ms
27 timing npm:load Completed in 18ms
28 timing command:run-script Completed in 574ms
29 timing command:start Completed in 576ms
30 verbose stack Error: command failed
30 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
30 verbose stack     at ChildProcess.emit (node:events:527:28)
30 verbose stack     at maybeClose (node:internal/child_process:1092:16)
30 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
31 verbose pkgid [email protected]
32 verbose cwd /usr/src/app
33 verbose Linux 5.10.104-linuxkit
34 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
35 verbose node v16.15.0
36 verbose npm  v8.5.5
37 error path /usr/src/app
38 error command failed
39 error signal SIGSEGV
40 error command sh -c node index.js
41 verbose exit 1
42 timing npm Completed in 690ms
43 verbose code 1
44 error A complete log of this run can be found in:
44 error     /root/.npm/_logs/2022-05-26T19_40_15_807Z-debug-0.log

from classic-level.

mahnunchik avatar mahnunchik commented on May 20, 2024

Builded module from source works as expected:

FROM node:16-alpine

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

ENV NODE_ENV production
COPY package* /usr/src/app/
RUN apk add --no-cache --virtual .build-deps \
  g++ make python3 \
  && npm ci --build-from-source && npm cache clean --force \
  && apk del .build-deps

COPY . /usr/src/app/

CMD ["npm", "start"]

from classic-level.

juliangruber avatar juliangruber commented on May 20, 2024

I assume this is because of musl/glibc, have you checked whether any of https://wiki.alpinelinux.org/wiki/Running_glibc_programs fixes this?

from classic-level.

mahnunchik avatar mahnunchik commented on May 20, 2024

@juliangruber rebuild from source on alpine linux npm ci --build-from-source solves the issue. So it is not related to musl.

from classic-level.

vweevers avatar vweevers commented on May 20, 2024

I'm unable to reproduce, and verified that the prebuilt binary for alpine is loaded from node_modules/classic-level/prebuilds/linux-x64/node.napi.musl.node.

What's in your npm start script? I used CMD ["node", "index.mjs"] instead of CMD ["npm", "start"].

from classic-level.

mahnunchik avatar mahnunchik commented on May 20, 2024

This happens in docker on Mac M1...

from classic-level.

mahnunchik avatar mahnunchik commented on May 20, 2024

@vweevers I've updated original issue

from classic-level.

vweevers avatar vweevers commented on May 20, 2024

Oh I see. I misunderstood.

I'm not familiar with this setup. I guess it's a CPU incompatibility, because the prebuilt binary was created on x64. What's the output of node -p process.arch in the docker container? And node -p process.config.variables?

from classic-level.

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.