wechaty / getting-started

A Starter Project Template for Wechaty works out-of-the-box
https://gitpod.io/#https://github.com/wechaty/wechaty-getting-started
Apache License 2.0
806 stars 352 forks source link

npm install error #269

Open ZhengXiaowei opened 2 years ago

ZhengXiaowei commented 2 years ago

my node version: 10/14/16/18 while i use each node version to install in this template, always trigger errors like these:

npm ERR! code 1 npm ERR! path /Users/xiao/WorkSpace/MySpace/vv-wechaty/node_modules/frida npm ERR! command failed npm ERR! command sh -c prebuild-install || node-gyp rebuild npm ERR! prebuild-install warn install Request timed out npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.0.0 npm ERR! gyp info using node@16.15.1 | darwin | arm64 npm ERR! gyp info find Python using Python version 3.8.9 found at "/Library/Developer/CommandLineTools/usr/bin/python3" npm ERR! gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/Users/xiao/.nvm/versions/node/v16.15.1/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/xiao/WorkSpace/MySpace/vv-wechaty/node_modules/frida/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/Users/xiao/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/Users/xiao/Library/Caches/node-gyp/16.15.1/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/xiao/Library/Caches/node-gyp/16.15.1', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/xiao/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/xiao/Library/Caches/node-gyp/16.15.1/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/xiao/WorkSpace/MySpace/vv-wechaty/node_modules/frida', 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! gyp: binding.gyp not found (cwd: /Users/xiao/WorkSpace/MySpace/vv-wechaty/node_modules/frida) 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 (/Users/xiao/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:261:16) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28) npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) npm ERR! gyp ERR! System Darwin 21.5.0 npm ERR! gyp ERR! command "/Users/xiao/.nvm/versions/node/v16.15.1/bin/node" "/Users/xiao/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd /Users/xiao/WorkSpace/MySpace/vv-wechaty/node_modules/frida npm ERR! gyp ERR! node -v v16.15.1 npm ERR! gyp ERR! node-gyp -v v9.0.0 npm ERR! gyp ERR! not ok

how to solve it?

Realzzz1874 commented 2 years ago

install the dependencies one by one.

anotherso1a commented 1 year ago

same issue, dotenv can not install