Skip to content

install error with node 18.9.0Β #2257

@PengBoUESTC

Description

@PengBoUESTC

Issue or Feature

npm ERR! code 1
npm ERR! path xx/node_modules/canvas
npm ERR! command failed
npm ERR! command sh -c -- node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.1.0
npm ERR! gyp info using node@18.9.0 | darwin | x64
npm ERR! gyp info find Python using Python version 3.10.6 found at "/usr/local/opt/python@3.10/bin/python3.10"
npm ERR! gyp info spawn /usr/local/opt/python@3.10/bin/python3.10
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   'xxx/.nvm/versions/node/v18.9.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'xxx/node_modules/canvas/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'xx/.nvm/versions/node/v18.9.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'xx/Library/Caches/node-gyp/18.9.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/xx/Library/Caches/node-gyp/18.9.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=xx/.nvm/versions/node/v18.9.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=xx/Library/Caches/node-gyp/18.9.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/xx/node_modules/canvas',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! /bin/sh: pkg-config: command not found
npm ERR! gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (xx/.nvm/versions/node/v18.9.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:284:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 20.6.0
npm ERR! gyp ERR! command "xx/.nvm/versions/node/v18.9.0/bin/node" "/xx/.nvm/versions/node/v18.9.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /xxx/node_modules/canvas
npm ERR! gyp ERR! node -v v18.9.0
npm ERR! gyp ERR! node-gyp -v v9.1.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /xxx/.npm/_logs/2023-06-12T09_09_52_894Z-debug-0.log

Your Environment

  • Version of node-canvas: 2.11.2
  • Environment: node 18.9.0 ; OS: macOS 11.6

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