Closed otiskujawa closed 1 year ago
this is issue related to python version in clean system with python 3.10.10 it gives same error as #159
# yarn install
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
warning Pattern ["wrap-ansi@^7.0.0"] is trying to unpack in the same destination "/usr/local/share/.cache/yarn/v6/npm-wrap-ansi-cjs-7.0.0-67e145cff510a6a6984bdf1152911d69d2eb9e43-integrity/node_modules/wrap-ansi-cjs" as pattern ["wrap-ansi-cjs@npm:wrap-ansi@^7.0.0"]. This could result in non-deterministic behavior, skipping.
[3/4] Linking dependencies...
warning " > @jimp/plugin-fisheye@0.22.8" has unmet peer dependency "@jimp/custom@>=0.3.5".
warning " > ts-node@10.9.1" has unmet peer dependency "@types/node@*".
[4/4] Building fresh packages...
[1/4] ⡀ @discordjs/opus
[2/4] ⡀ canvas
[3/4] ⡀ node
error /home/otis/Naoko/node_modules/gl: Command failed.
Exit code: 7
Command: prebuild-install || node-gyp rebuild
Arguments:
Directory: /home/otis/Naoko/node_modules/gl
Output:
prebuild-install WARN install No prebuilt binaries found (target=20.3.0 runtime=node arch=x64 libc= platform=linux)
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@20.3.0 | linux | x64
gyp info find Python using Python version 3.10.10 found at "/usr/bin/python3"
gyp http GET https://nodejs.org/download/release/v20.3.0/node-v20.3.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v20.3.0/node-v20.3.0-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v20.3.0/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v20.3.0/SHASUMS256.txt
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack TypeError: Cannot assign to read only property 'cflags' of object '#<Object>'
gyp ERR! stack at createConfigFile (/home/otis/Naoko/node_modules/node-gyp/lib/configure.js:117:21)
gyp ERR! stack at /home/otis/Naoko/node_modules/node-gyp/lib/configure.js:84:9
gyp ERR! stack at FSReqCallback.oncomplete (node:fs:188:23)
gyp ERR! System Linux 6.3.5-arch1-1
gyp ERR! command "/usr/bin/node" "/home/otis/Naoko/node_modules/gl/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /home/otis/Naoko/node_modules/gl
gyp ERR! node -v v20.3.0
gyp ERR! node-gyp -v v7.1.2
This is an Issue with node-canvas-webgl still depending on gl version 4.9 and version of python, node or nodegyp being too new. The version is updated in their repo: https://github.com/akira-cn/node-canvas-webgl/pull/11, but that version is not published.
For easy installing, you can the Docker image by running docker compose run --rm -it node-cli yarn install
, but because of the Debian bookworm release and me being dumb, not pinning the image version, you need a small change to the Dockerfile:
-FROM node:18
+FROM node:18-bullseye
USER root
RUN apt update \
&& apt install -y build-essential g++-10 libxi-dev libxext-dev libpixman-1-dev libcairo2-dev libpango1.0-dev libjpeg62-turbo-dev libgif-dev libjpeg-dev librsvg2-dev mesa-common-dev \
&& ln -s /usr/bin/python3 /usr/bin/python
is this possible to fix this issue by using this fork? https://www.npmjs.com/package/@lumen5/node-canvas-webgl
python 3.11.3