Skip to content

Instantly share code, notes, and snippets.

@dazuiba
Created February 27, 2024 14:02
Show Gist options
  • Save dazuiba/0ab60032c0fd6e0f661afe2c55e8bb38 to your computer and use it in GitHub Desktop.
Save dazuiba/0ab60032c0fd6e0f661afe2c55e8bb38 to your computer and use it in GitHub Desktop.
//to fix this issue, you can add this to ~/.bashrc:
//
// export CPATH=`xcrun --show-sdk-path`/usr/include
npm ERR! #include <errno.h>
~/dev/my/outline-apps[master]$ npm install -g iconv
npm ERR! code 1
npm ERR! path /Users/sam/.nvm/versions/node/v16.13.0/lib/node_modules/iconv
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! CC(target) Release/obj.target/iconv/binding.o
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.4.0
npm ERR! gyp info using node@16.13.0 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.11.3 found at "/usr/local/Homebrew/Cellar/python@3.11/3.11.3/bin/python3"
npm ERR! gyp info spawn /usr/local/Homebrew/Cellar/python@3.11/3.11.3/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/Users/sam/.nvm/versions/node/v16.13.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 '/Users/sam/.nvm/versions/node/v16.13.0/lib/node_modules/iconv/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/sam/.nvm/versions/node/v16.13.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/sam/Library/Caches/node-gyp/16.13.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=/Users/sam/Library/Caches/node-gyp/16.13.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/sam/.nvm/versions/node/v16.13.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/sam/Library/Caches/node-gyp/16.13.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/sam/.nvm/versions/node/v16.13.0/lib/node_modules/iconv',
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! Error in sitecustomize; set PYTHONVERBOSE for traceback:
npm ERR! NameError: name 'new_prefix' is not defined
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../binding.c:17:
npm ERR! ../support/iconv.h:54:10: fatal error: 'errno.h' file not found
npm ERR! #include <errno.h>
npm ERR! ^~~~~~~~~
npm ERR! 1 error generated.
npm ERR! make: *** [Release/obj.target/iconv/binding.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/Users/sam/.nvm/versions/node/v16.13.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 23.1.0
npm ERR! gyp ERR! command "/Users/sam/.nvm/versions/node/v16.13.0/bin/node" "/Users/sam/.nvm/versions/node/v16.13.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/sam/.nvm/versions/node/v16.13.0/lib/node_modules/iconv
npm ERR! gyp ERR! node -v v16.13.0
npm ERR! gyp ERR! node-gyp -v v9.4.0
npm ERR! gyp ERR! not ok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment