Skip to content

Failing to build on ubuntu 22.04 x86 #2288

Open
@mwolfeu

Description

@mwolfeu

Issue or Feature

$ npm i canvas
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated [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.
npm WARN deprecated [email protected]: Redundant dependency in your project.
npm WARN deprecated [email protected]: support for ECMAScript is superseded by uglify-js as of v3.13.0
npm ERR! code 1
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build --update-binary

$ tail -40 /home/xxx/.npm/_logs/2023-09-18T13_13_48_504Z-debug-0.log
2918 timing build:link:node_modules/umd Completed in 2ms
2919 timing build:link:node_modules/undeclared-identifiers Completed in 2ms
2920 timing build:link:node_modules/uuid Completed in 2ms
2921 timing build:link:node_modules/watchify Completed in 2ms
2922 timing build:link:node_modules/which Completed in 2ms
2923 timing build:link Completed in 3ms
2924 info run [email protected] install node_modules/canvas node-pre-gyp install --fallback-to-build --update-binary
2925 info run [email protected] install node_modules/wrtc node scripts/download-prebuilt.js
2926 info run [email protected] install { code: 1, signal: null }
2927 info run [email protected] install { code: 1, signal: null }
2928 timing reify:rollback:createSparse Completed in 137ms
2929 timing reify:rollback:retireShallow Completed in 0ms
2930 timing command:i Completed in 18535ms
2931 verbose stack Error: command failed
2931 verbose stack at ChildProcess. (/snap/node/7707/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:53:27)
2931 verbose stack at ChildProcess.emit (node:events:514:28)
2931 verbose stack at maybeClose (node:internal/child_process:1091:16)
2931 verbose stack at Socket. (node:internal/child_process:449:11)
2931 verbose stack at Socket.emit (node:events:514:28)
2931 verbose stack at Pipe. (node:net:323:12)
2932 verbose pkgid [email protected]
2934 verbose Linux 5.19.0-50-generic
2935 verbose node v18.17.1
2936 verbose npm v9.6.7
2937 error code 1
2939 error command failed
2940 error command sh -c node-pre-gyp install --fallback-to-build --update-binary
2941 verbose exit 1
2942 timing npm Completed in 18624ms
2943 verbose unfinished npm timer reify 1695042828591
2944 verbose unfinished npm timer reify:build 1695042846900
2945 verbose unfinished npm timer build 1695042846900
2946 verbose unfinished npm timer build:deps 1695042846901
2947 verbose unfinished npm timer build:run:install 1695042846910
2948 verbose unfinished npm timer build:run:install:node_modules/canvas 1695042846910
2949 verbose unfinished npm timer build:run:install:node_modules/wrtc 1695042846921
2950 verbose code 1

Steps to Reproduce

sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
npm i canvas

Your Environment

$ node -v
v18.17.1
$ node-pre-gyp -v
v0.17.0
$ uname -a
Linux carbon 5.19.0-50-generic #50-Ubuntu SMP PREEMPT_DYNAMIC Mon Jul 10 18:24:29 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

ubuntu 22.04

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions