microsoft / node-pty

Fork pseudoterminals in Node.JS
Other
1.46k stars 235 forks source link

Install failure by using yarn on m1 mac #514

Closed gylove1994 closed 2 years ago

gylove1994 commented 2 years ago

Environment details

Issue description

It seem caused by the node-v13.6.3-headers.tar.gz not find in taobao registry mirror? I tried to change the registry to the registry.yarnpkg.com,but It still not work. How can I fix it?

log

yarn add v1.22.17
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
success Saved 1 new dependency.
info Direct dependencies
└─ node-pty@0.10.1
info All dependencies
└─ node-pty@0.10.1
$ electron-builder install-app-deps
  • electron-builder  version=22.14.5
  • rebuilding native dependencies  dependencies=node-pty@0.10.1 platform=darwin arch=arm64
  • rebuilding native dependency  name=node-pty version=0.10.1
  ⨯ cannot execute  cause=exit status 1
yarn run v1.22.17
$ node scripts/install.js
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

                    errorOut=gyp info it worked if it ends with ok
    gyp info using node-gyp@8.2.0
    gyp info using node@17.0.1 | darwin | arm64
    gyp info find Python using Python version 3.8.9 found at "/Library/Developer/CommandLineTools/usr/bin/python3"
    gyp http GET https://npm.taobao.org/dist/v13.6.3/node-v13.6.3-headers.tar.gz
    gyp http 404 https://npm.taobao.org/dist/v13.6.3/node-v13.6.3-headers.tar.gz
    gyp WARN install got an error, rolling back install
    gyp ERR! configure error 
    gyp ERR! stack Error: 404 response downloading https://npm.taobao.org/dist/v13.6.3/node-v13.6.3-headers.tar.gz
    gyp ERR! stack     at go (/opt/homebrew/Cellar/node/17.0.1/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:153:17)
    gyp ERR! stack     at processTicksAndRejections (node:internal/process/task_queues:96:5)
    gyp ERR! stack     at async install (/opt/homebrew/Cellar/node/17.0.1/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:62:18)
    gyp ERR! System Darwin 21.1.0
    gyp ERR! command "/opt/homebrew/Cellar/node/17.0.1/bin/node" "/opt/homebrew/Cellar/node/17.0.1/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /Users/gylove1994/WebstormProjects/vue3-ts/vue3-ts-demo/node_modules/node-pty
    gyp ERR! node -v v17.0.1
    gyp ERR! node-gyp -v v8.2.0
    gyp ERR! not ok 
error Command failed with exit code 1.

                    command=/opt/homebrew/Cellar/node/17.0.1/bin/node /opt/homebrew/lib/node_modules/yarn/bin/yarn.js run install
                    workingDir=/Users/gylove1994/WebstormProjects/vue3-ts/vue3-ts-demo/node_modules/node-pty
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Tyriar commented 2 years ago

Not sure about the taobao problem but you're using node v17.0.1 so that's probably the reason it won't work when pointing at yarnpkg https://github.com/microsoft/node-pty/issues/438