Fatal error node'a przy instalacji zależności na 4programmers/php-node

2

Docker u mnie ma przydzielone 16GB.

@Adam Boduch Jakiś pomysł?

PS C:\Users\Riddle\PhpstormProjects\coyote> docker-compose exec php bash
root@708c813b8049:/var/www# yarn add @riddled/[email protected]
yarn add v1.22.15
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "[email protected] - 3".
warning " > [email protected]" has unmet peer dependency "popper.js@^1.16.1".

<--- Last few GCs --->

[124:0x4c222e0]    85594 ms: Mark-sweep 4037.2 (4131.3) -> 4027.5 (4134.3) MB, 829.7 / 0.0 ms  (average mu = 0.137, current mu = 0.057) allocation failure scavenge might not succeed
[124:0x4c222e0]    86468 ms: Mark-sweep 4043.2 (4134.3) -> 4032.5 (4139.3) MB, 815.1 / 0.0 ms  (average mu = 0.104, current mu = 0.068) allocation failure scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0xb00d90 node::Abort() [node]
 2: 0xa1823b node::FatalError(char const*, char const*) [node]
 3: 0xcedbce v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xcedf47 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xea6105  [node]
 6: 0xea6be6  [node]
 7: 0xeb4b1e  [node]
 8: 0xeb5560 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 9: 0xeb84de v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
10: 0xe7990a v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
11: 0x11f2f06 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
12: 0x15e7819  [node]
Aborted
root@708c813b8049:/var/www#
PS C:\Users\Riddle\PhpstormProjects\coyote> docker ps
CONTAINER ID   IMAGE                                        COMMAND                  CREATED          STATUS                     PORTS                                                                         NAMES
b8a70e48e40c   selenium/standalone-chrome:3.11.0-antimony   "/opt/bin/entry_poin…"   17 minutes ago   Up 5 minutes               4444/tcp                                                                      coyote_selenium_1
ef22ada46897   graylog/graylog:3.1                          "tini -- /docker-ent…"   17 minutes ago   Up 5 minutes (healthy)     0.0.0.0:12201->12201/tcp, 0.0.0.0:12201->12201/udp, 0.0.0.0:29000->9000/tcp   coyote_graylog_1
95d6069ac1a4   nginx:1.17                                   "nginx -g 'daemon of…"   17 minutes ago   Up 5 minutes               0.0.0.0:8880->80/tcp                                                          coyote_nginx_1
2a00a3b17f28   docker.elastic.co/kibana/kibana:6.8.6        "/usr/local/bin/kiba…"   17 minutes ago   Up 5 minutes               0.0.0.0:5601->5601/tcp                                                        coyote_kibana_1
add89c2e1d34   elasticsearch:6.8.6                          "/usr/local/bin/dock…"   17 minutes ago   Up 5 minutes               0.0.0.0:9200->9200/tcp, 9300/tcp                                              coyote_elasticsearch_1
7493ca73ea2c   minio/minio                                  "/usr/bin/docker-ent…"   17 minutes ago   Up 5 minutes               0.0.0.0:39000->9000/tcp                                                       coyote_minio_1
9b6da75289dd   mailhog/mailhog                              "MailHog"                17 minutes ago   Up 5 minutes               1025/tcp, 0.0.0.0:8025->8025/tcp                                              coyote_mailhog_1
f9154b711c58   4programmers/websocket:latest                "/start.sh"              17 minutes ago   Up 5 minutes               80/tcp, 0.0.0.0:8888->8888/tcp                                                coyote_websocket_1
708c813b8049   4programmers/php-node:latest                 "docker-php-entrypoi…"   17 minutes ago   Up 5 minutes (unhealthy)   9000/tcp                                                                      coyote_php_1
3485cf846135   mongo:3                                      "docker-entrypoint.s…"   17 minutes ago   Up 5 minutes               27017/tcp                                                                     coyote_mongo_1
618c87cdc423   postgres:13-alpine                           "docker-entrypoint.s…"   17 minutes ago   Up 5 minutes               0.0.0.0:5432->5432/tcp                                                        coyote_db_1
b2434427c709   4programmers/coyote-es:latest                "docker-entrypoint.s…"   17 minutes ago   Up 5 minutes               3500/tcp                                                                      coyote_es_1
fec9e5969544   redis:6-alpine                               "docker-entrypoint.s…"   17 minutes ago   Up 5 minutes               0.0.0.0:6379->6379/tcp                                                        coyote_redis_1
d7d06d136aeb   4programmers/php-node:latest                 "cron -f -l 8"           17 minutes ago   Up 5 minutes               9000/tcp                                                                      coyote_cron_1
PS C:\Users\Riddle\PhpstormProjects\coyote> docker images
REPOSITORY                        TAG               IMAGE ID       CREATED         SIZE
4programmers/php-node             latest            be0b76ad0929   20 hours ago    811MB
minio/minio                       latest            01431999f934   2 weeks ago     393MB
minio/mc                          latest            4082fb25ac97   3 weeks ago     306MB
postgres                          13-alpine         68c344087a0b   3 weeks ago     195MB
redis                             6-alpine          5c08f13a2b92   4 weeks ago     32.4MB
4programmers/coyote-es            latest            47d82425b627   4 months ago    234MB
mongo                             3                 2f21415cb85f   7 months ago    453MB
4programmers/websocket            latest            d9fa5489a57b   7 months ago    382MB
mailhog/mailhog                   latest            4de68494cd0d   16 months ago   392MB
nginx                             1.17              9beeba249f3e   19 months ago   127MB
graylog/graylog                   3.1               ca38a27808e3   23 months ago   481MB
docker.elastic.co/kibana/kibana   6.8.6             adfab5632ef4   24 months ago   739MB
elasticsearch                     6.8.6             c8b4938e5db2   24 months ago   879MB
selenium/standalone-chrome        3.11.0-antimony   b5d41d1094cf   3 years ago     824MB
root@708c813b8049:/var/www# node -v
v16.13.1
0

Dobra wiadomość jest taka, że masz v16 czyli obraz się uaktualnił :) A robiłeś yarn install? Jeżeli tak to spróbowałbym jeszcze usunąć katalog node_modules i zaciągnąć jeszcze raz.

1

@Adam Boduch: Kolejny, inny error. (efekt taki sam, nawet jak usunę zarówno node_modules/ oraz yarn.lock)

root@708c813b8049:/var/www# rm -rf node_modules/
root@708c813b8049:/var/www# yarn install
yarn install v1.22.15
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "[email protected] - 3".
warning " > [email protected]" has unmet peer dependency "popper.js@^1.16.1".
[4/4] Building fresh packages...
[7/8] ⠄ deasync
[-/8] ⠄ waiting...
[-/8] ⠄ waiting...
[4/8] ⠄ node-sass
error /var/www/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: /var/www/node_modules/node-sass
Output:
Building: /usr/bin/node /var/www/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   '/usr/bin/node',
gyp verb cli   '/var/www/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library='
gyp verb cli ]
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (/var/www/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/var/www/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/var/www/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /var/www/node_modules/which/which.js:89:16
gyp verb `which` failed     at /var/www/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /var/www/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198:21)
gyp verb `which` failed  python2 Error: not found: python2
gyp verb `which` failed     at getNotFoundError (/var/www/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/var/www/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/var/www/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /var/www/node_modules/which/which.js:89:16
gyp verb `which` failed     at /var/www/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /var/www/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198:21) {
gyp verb `which` failed   code: 'ENOENT'
gyp verb `which` failed }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed     at getNotFoundError (/var/www/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/var/www/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/var/www/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /var/www/node_modules/which/which.js:89:16
gyp verb `which` failed     at /var/www/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /var/www/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198:21)
gyp verb `which` failed  python Error: not found: python
gyp verb `which` failed     at getNotFoundError (/var/www/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/var/www/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/var/www/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /var/www/node_modules/which/which.js:89:16
gyp verb `which` failed     at /var/www/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /var/www/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198:21) {
gyp verb `which` failed   code: 'ENOENT'
gyp verb `which` failed }
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (/var/www/node_modules/node-gyp/lib/configure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (/var/www/node_modules/node-gyp/lib/configure.js:406:16)
gyp ERR! stack     at F (/var/www/node_modules/which/which.js:68:16)
gyp ERR! stack     at E (/var/www/node_modules/which/which.js:80:29)
gyp ERR! stack     at /var/www/node_modules/which/which.js:89:16
gyp ERR! stack     at /var/www/node_modules/isexe/index.js:42:5
gyp ERR! stack     at /var/www/node_modules/isexe/mode.js:8:5
gyp ERR! stack     at FSReqCallback.oncomplete (node:fs:198:21)
gyp ERR! System Linux 5.10.76-linuxkit
gyp ERR! command "/usr/bin/node" "/var/www/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /var/www/node_modules/node-sass
gyp ERR! node -v v16.13.1




root@708c813b8049:/var/www#
1

Wygląda na to, że robisz wszystko poprawnie. Na serwerze CI ten obraz buduje się prawidłowo. Proponuje zatem jeszcze skasować kontener i uruchomić na nowo. Gdzieś w kontenerze chyba cache się jeszcze zachował (docker-compose down && docker-compose up -d).

1
PS C:\Users\Riddle\PhpstormProjects\coyote> docker-compose down
[+] Running 10/11
 - Container coyote_redis_1          Removed                                                                                                                                                                                       0.2s
 - Container coyote_kibana_1         Removed                                                                                                                                                                                       0.2s
[+] Running 14/14te_mailhog_1        Removed                                                                                                                                                                                       0.2s
 - Container coyote_redis_1          Removed                                                                                                                                                                                       0.2s
 - Container coyote_kibana_1         Removed                                                                                                                                                                                       0.2s
 - Container coyote_mailhog_1        Removed                                                                                                                                                                                       0.2s
[+] Running 16/15te_selenium_1       Removed                                                                                                                                                                                       0.2s
 - Container coyote_redis_1          Removed                                                                                                                                                                                       0.2s
 - Container coyote_kibana_1         Removed                                                                                                                                                                                       0.2s
 - Container coyote_mailhog_1        Removed                                                                                                                                                                                       0.2s
 - Container coyote_selenium_1       Removed                                                                                                                                                                                       0.2s
 - Container coyote_createbuckets_1  Removed                                                                                                                                                                                       0.2s
 - Container coyote_graylog_1        Removed                                                                                                                                                                                       0.2s
 - Container coyote_websocket_1      Removed                                                                                                                                                                                       0.2s
 - Container coyote_es_1             Removed                                                                                                                                                                                       0.2s
 - Container coyote_cron_1           Removed                                                                                                                                                                                       0.2s
 - Container coyote_db_1             Removed                                                                                                                                                                                       0.2s
 - Container coyote_minio_1          Removed                                                                                                                                                                                       0.1s
 - Container coyote_nginx_1          Removed                                                                                                                                                                                       0.1s
 - Container coyote_mongo_1          Removed                                                                                                                                                                                       0.1s
 - Container coyote_elasticsearch_1  Removed                                                                                                                                                                                       0.1s
 - Container coyote_php_1            Removed                                                                                                                                                                                       0.1s
 - Network coyote                    Removed                                                                                                                                                                                       0.1s
PS C:\Users\Riddle\PhpstormProjects\coyote> docker-compose down
[+] Running 1/0
 - coyote  Warning: No resource found to remove                                                                                                                                                                                    0.0s
PS C:\Users\Riddle\PhpstormProjects\coyote> docker-compose up
PS C:\Users\Riddle\PhpstormProjects\coyote> docker-compose exec php bash
root@741573b7f8c4:/var/www# yarn install
yarn install v1.22.15
info No lockfile found.
[1/4] Resolving packages...
warning node-sass > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning node-sass > node-gyp > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning node-sass > node-gyp > [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
warning node-sass > request > [email protected]: this library is no longer supported
warning node-sass > request > [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
warning optimize-css-assets-webpack-plugin > cssnano > cssnano-preset-default > postcss-svgo > [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
warning svg-spritemap-webpack-plugin > [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
warning svg-spritemap-webpack-plugin > [email protected]: Deprecated due to CVE-2021-21366 resolved in 0.5.0
warning svg-spritemap-webpack-plugin > @hapi/[email protected]: Switch to 'npm install joi'
warning svg-spritemap-webpack-plugin > @hapi/joi > @hapi/[email protected]: Moved to 'npm install @sideway/address'
warning svg-spritemap-webpack-plugin > @hapi/joi > @hapi/[email protected]: Moved to 'npm install @sideway/formula'
warning svg-spritemap-webpack-plugin > @hapi/joi > @hapi/[email protected]: Moved to 'npm install @sideway/pinpoint'
warning webpack > watchpack > watchpack-chokidar2 > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning webpack > watchpack > watchpack-chokidar2 > chokidar > [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning webpack > node-libs-browser > url > [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
warning webpack > micromatch > snapdragon > source-map-resolve > [email protected]: https://github.com/lydell/resolve-url#deprecated
warning webpack > micromatch > snapdragon > source-map-resolve > [email protected]: Please see https://github.com/lydell/urix#deprecated
warning babel-jest > @jest/transform > jest-haste-map > [email protected]: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
warning vue-jest > extract-from-css > css > [email protected]: Please see https://github.com/lydell/urix#deprecated
warning vue-jest > babel-plugin-transform-es2015-modules-commonjs > babel-runtime > [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feat
ure detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "[email protected] - 3".
warning " > [email protected]" has unmet peer dependency "popper.js@^1.16.1".
[4/4] Building fresh packages...
[-/7] ⠈ waiting...
[2/7] ⠈ @sentry/cli
[-/7] ⠈ waiting...
[4/7] ⠁ node-sass
error /var/www/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: /var/www/node_modules/node-sass
Output:
Building: /usr/bin/node /var/www/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   '/usr/bin/node',
gyp verb cli   '/var/www/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library='
gyp verb cli ]
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (/var/www/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/var/www/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/var/www/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /var/www/node_modules/which/which.js:89:16
gyp verb `which` failed     at /var/www/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /var/www/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198:21)
gyp verb `which` failed  python2 Error: not found: python2
gyp verb `which` failed     at getNotFoundError (/var/www/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/var/www/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/var/www/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /var/www/node_modules/which/which.js:89:16
gyp verb `which` failed     at /var/www/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /var/www/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198:21) {
gyp verb `which` failed   code: 'ENOENT'
gyp verb `which` failed }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed     at getNotFoundError (/var/www/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/var/www/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/var/www/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /var/www/node_modules/which/which.js:89:16
gyp verb `which` failed     at /var/www/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /var/www/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198:21)
gyp verb `which` failed  python Error: not found: python
gyp verb `which` failed     at getNotFoundError (/var/www/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/var/www/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/var/www/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /var/www/node_modules/which/which.js:89:16
gyp verb `which` failed     at /var/www/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /var/www/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198:21) {
gyp verb `which` failed   code: 'ENOENT'
gyp verb `which` failed }
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (/var/www/node_modules/node-gyp/lib/configure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (/var/www/node_modules/node-gyp/lib/configure.js:406:16)
gyp ERR! stack     at F (/var/www/node_modules/which/which.js:68:16)
gyp ERR! stack     at E (/var/www/node_modules/which/which.js:80:29)
gyp ERR! stack     at /var/www/node_modules/which/which.js:89:16
gyp ERR! stack     at /var/www/node_modules/isexe/index.js:42:5
gyp ERR! stack     at /var/www/node_modules/isexe/mode.js:8:5
gyp ERR! stack     at FSReqCallback.oncomplete (node:fs:198:21)
gyp ERR! System Linux 5.10.76-linuxkit
gyp ERR! command "/usr/bin/node" "/var/www/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /var/www/node_modules/node-sass
gyp ERR! node -v v16.13.1




root@741573b7f8c4:/var/www#

Powtarzałem potem to samo, z usuwaniem node_modules/ kiedy kontenery były usunięte.

0

Powiem Ci że już nie za bardzo mam pomysł co zrobić.

  1. Masz najnowszy kod z git.
  2. Masz najnowszy obraz
  3. Usunąłeś node_modules
  4. Spróbuj jeszcze yarn cache clean ale wątpie aby to pomogło...

Na pewno masz też te same wersje:

root@89133ebf1de0:/var/www# yarn -v
1.22.15
root@89133ebf1de0:/var/www# node -v
v16.13.1
0
Adam Boduch napisał(a):

Powiem Ci że już nie za bardzo mam pomysł co zrobić.

  1. Masz najnowszy kod z git.
  2. Masz najnowszy obraz
  3. Usunąłeś node_modules
  4. Spróbuj jeszcze yarn cache clean ale wątpie aby to pomogło...

Na pewno masz też te same wersje:

root@89133ebf1de0:/var/www# yarn -v
1.22.15
root@89133ebf1de0:/var/www# node -v
v16.13.1

No z tego co widze, to yarn próbuje przebudować jakieś binarki dla node-gyp, pewnie dla node-sass. @Adam Boduch Mógłbyś wbić na swojego dockera do kontenera php i sprawdzić czy jest python albo python2 w nim? Bo jeśli nie masz, tzn. że tym obranem nie da się zbudować tych binarek.

Może zbudowałeś je na swojej lokalnej maszynie, i docker tylko z nich korzysta? Np zrobiłeś yarn install poza dockerem, a yarn run dev w kontenerze?

PS: yarn install na localu działa u mnie.
PS2: Ale dodanie libki już nie, error taki sam jak na dockerze:

PS C:\Users\Riddle\PhpstormProjects\coyote> yarn add @riddled/[email protected]
yarn add v1.22.15
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "[email protected] - 3".
warning " > [email protected]" has unmet peer dependency "popper.js@^1.16.1".

<--- Last few GCs --->

[16256:0000018306193710]    83454 ms: Mark-sweep 4043.0 (4136.1) -> 4031.1 (4139.6) MB, 874.8 / 0.0 ms  (average mu = 0.151, current mu = 0.033) allocation failure scavenge might not succeed
[16256:0000018306193710]    84399 ms: Mark-sweep 4046.8 (4139.6) -> 4033.9 (4142.3) MB, 887.8 / 0.0 ms  (average mu = 0.107, current mu = 0.061) allocation failure scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 00007FF76CA2013F v8::internal::CodeObjectRegistry::~CodeObjectRegistry+112495
 2: 00007FF76C9AF396 DSA_meth_get_flags+65526
 3: 00007FF76C9B024D node::OnFatalError+301
 4: 00007FF76D2E19EE v8::Isolate::ReportExternalAllocationLimitReached+94
 5: 00007FF76D2CBECD v8::SharedArrayBuffer::Externalize+781
 6: 00007FF76D16F61C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1468
 7: 00007FF76D17C2C9 v8::internal::Heap::PublishPendingAllocations+1129
 8: 00007FF76D17929A v8::internal::Heap::PageFlagsAreConsistent+2842
 9: 00007FF76D16BF19 v8::internal::Heap::CollectGarbage+2137
10: 00007FF76D16A0D0 v8::internal::Heap::AllocateExternalBackingStore+2000
11: 00007FF76D18EA06 v8::internal::Factory::NewFillerObject+214
12: 00007FF76CEC1CD5 v8::internal::DateCache::Weekday+1797
13: 00007FF76D36F3E1 v8::internal::SetupIsolateDelegate::SetupHeap+494417
14: 00007FF76D384E82 v8::internal::SetupIsolateDelegate::SetupHeap+583154
15: 0000018308021C15

1

@Markuz: obydwoje uruchamiamy yarn wewnątrz kontenera.

Przed chwilą skasowałem node_modules i jeszcze raz wykonałem yarn install wewnątrz kontenera. Zobacz też na tego builda: https://github.com/adam-boduch/coyote/runs/4493586175?check_suite_focus=true#step:8:694 Też przechodzi na serwerze CI :|

Pythona nie ma w kontenerze.

0
Adam Boduch napisał(a):

Przed chwilą skasowałem node_modules i jeszcze raz wykonałem yarn install wewnątrz kontenera. Zobacz też na tego builda: https://github.com/adam-boduch/coyote/runs/4493586175?check_suite_focus=true#step:8:694 Też przechodzi na serwerze CI :|

No jedyne co jest w buildzie napisane to

[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "[email protected] - 3".
warning " > [email protected]" has unmet peer dependency "popper.js@^1.16.1".
[4/4] Building fresh packages...
Done in 35.99s.

Czyli że tam pykło.

Zauważyłem, żę jak zrobię yarn install na localu, to potem yarn install przechodzi normalnie na dockerze.

@Adam Boduch Dobra, udało się. Zostawiłem jedną zależność niepotrzebnie w "dependencies" zamiast w "devDependencies" w libce. Chyba suma tych libek + suma libek w Coyote z jakiegoś powodu przekroczył heap.

Co do ~ w .scss, to jak to zmieniłem to IDE już przestaje mi to ogarniać:
screenshot-20211213194947.png
Zostawić tak?

0

Zrobienie yarn install na localu, yarn install na dockerze i dodanie paczki na dockerze, też nie działa:

root@741573b7f8c4:/var/www# yarn install
yarn install v1.22.15
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.35s.
root@741573b7f8c4:/var/www# yarn add @riddled/[email protected]
yarn add v1.22.15
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "[email protected] - 3".
warning " > [email protected]" has unmet peer dependency "popper.js@^1.16.1".

<--- Last few GCs --->

[1001:0x60042e0]    67196 ms: Mark-sweep 4044.6 (4135.6) -> 4031.4 (4137.6) MB, 585.6 / 0.0 ms  (average mu = 0.128, current mu = 0.036) allocation failure scavenge might not succeed
[1001:0x60042e0]    67794 ms: Mark-sweep 4047.1 (4137.6) -> 4034.2 (4140.6) MB, 574.6 / 0.0 ms  (average mu = 0.085, current mu = 0.038) allocation failure scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0xb00d90 node::Abort() [node]
 2: 0xa1823b node::FatalError(char const*, char const*) [node]
 3: 0xcedbce v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xcedf47 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xea6105  [node]
 6: 0xea6be6  [node]
 7: 0xeb4b1e  [node]
 8: 0xeb5560 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 9: 0xeb84de v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
10: 0xe7990a v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
11: 0x11f2f06 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
12: 0x15e7819  [node]
Aborted
root@741573b7f8c4:/var/www#
1

@Adam Boduch: Mógłbyś odpalić u siebie to co ja, niżej, i wkleić co masz u siebie?

root@741573b7f8c4:/var/www# node
Welcome to Node.js v16.13.1.
Type ".help" for more information.
> v8.getHeapStatistics()
{
  total_heap_size: 6152192,
  total_heap_size_executable: 524288,
  total_physical_size: 5186824,
  total_available_size: 8636006120,
  used_heap_size: 5147320,
  heap_size_limit: 8640266240,
  malloced_memory: 139336,
  peak_malloced_memory: 582760,
  does_zap_garbage: 0,
  number_of_native_contexts: 1,
  number_of_detached_contexts: 0
}
>
1
root@89133ebf1de0:/var/www# node
Welcome to Node.js v16.13.1.
Type ".help" for more information.
> v8.getHeapStatistics()
{
  total_heap_size: 5619712,
  total_heap_size_executable: 524288,
  total_physical_size: 4076992,
  total_available_size: 2194433240,
  used_heap_size: 4281688,
  heap_size_limit: 2197815296,
  malloced_memory: 139336,
  peak_malloced_memory: 582760,
  does_zap_garbage: 0,
  number_of_native_contexts: 1,
  number_of_detached_contexts: 0
}

0

@Adam Boduch: myślę że kluczem jest ustalenie co takiego dokładnie robi yarn co powoduje taki błąd. Nie sądzę że to yarn sam w sobie, pewnie któraś z libek lub jej zależności.

Jest jakiś sposób żeby odpalić yarn w trybie super verbose?

0

Tak, trzeba dodać flagę --verbose. Sprawdziłem na serwerze testowym i tam również yarn install działa :|

Dobrze że możesz operować na yarnie na hoście.

0
Adam Boduch napisał(a):

Tak, trzeba dodać flagę --verbose. Sprawdziłem na serwerze testowym i tam również yarn install działa :|

Dobrze że możesz operować na yarnie na hoście.

Mogę zrobić install, ale nie mogę dodać libki. Jak robię add to leci ten sam error o heap.

Dobra, zajmę się tym w poniedziałek wieczorem. Kończę na dzisiaj.

1

Naprawione ;)

1 użytkowników online, w tym zalogowanych: 0, gości: 1