Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

yarn install problems on macOS 12+ #326

Closed
pztrn opened this issue May 30, 2022 · 3 comments · Fixed by #328
Closed

yarn install problems on macOS 12+ #326

pztrn opened this issue May 30, 2022 · 3 comments · Fixed by #328
Labels
bug Something isn't working

Comments

@pztrn
Copy link
Contributor

pztrn commented May 30, 2022

When trying to execute yarn install on main branch it tries to download electron 7.2.1 and fails to do so.

I'm on M1 powered Macbook Pro and macOS 12.4. Tried node 14, node 18, with yarn and npm - same. Also tried to delete lock files - no go.

yarn install v1.22.19
info No lockfile found.
[1/4] 🔍  Resolving packages...
warning @testing-library/jest-dom > css > [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
warning @types/[email protected]: This is a stub types definition for react-chartjs-2 (https://github.com/gor181/react-chartjs-2). react-chartjs-2 provides its own type definitions, so you don't need @types/react-chartjs-2 installed!
warning @types/[email protected]: This is a stub types definition. react-dnd provides its own type definitions, so you don't need this installed.
warning [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
warning babel-jest > @jest/transform > jest-haste-map > [email protected]: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
warning babel-jest > @jest/transform > jest-haste-map > sane > micromatch > snapdragon > [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
warning babel-jest > @jest/transform > jest-haste-map > sane > micromatch > snapdragon > source-map-resolve > [email protected]: https://github.com/lydell/resolve-url#deprecated
warning babel-jest > @jest/transform > jest-haste-map > sane > micromatch > snapdragon > source-map-resolve > [email protected]: See https://github.com/lydell/source-map-url#deprecated
warning babel-jest > @jest/transform > jest-haste-map > sane > micromatch > snapdragon > source-map-resolve > [email protected]: Please see https://github.com/lydell/urix#deprecated
warning electron-builder > dmg-builder > [email protected]: Disk image license agreements are deprecated by Apple and will probably be removed in a future macOS release. Discussion at: https://github.com/argv-minus-one/dmg-license/issues/11
warning electron-rebuild > lzma-native > [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
warning electron-rebuild > node-gyp > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning electron-rebuild > node-gyp > request > [email protected]: this library is no longer supported
warning electron-rebuild > node-gyp > request > [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.
warning eslint-config-erb > [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
warning less > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
[2/4] 🚚  Fetching packages...
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning " > @continuous-auth/[email protected]" has unmet peer dependency "semantic-release@>=15.9.0 <16.0.0".
warning " > [email protected]" has unmet peer dependency "mocha@>=1.7.0".
[4/4] 🔨  Building fresh packages...
[2/2] ⠈ electron
error /Users/pztrn/Library/Caches/Yarn/v6/.tmp/87cd208322c666ac5b5d0473c4474f55.65ffa894bf635745d9399e79fb38682ccfd9c6e0.prepare/node_modules/electron: Command failed.
Exit code: 1
Command: node install.js
Arguments:
Directory: /Users/pztrn/Library/Caches/Yarn/v6/.tmp/87cd208322c666ac5b5d0473c4474f55.65ffa894bf635745d9399e79fb38682ccfd9c6e0.prepare/node_modules/electron
Output:
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

GotError [HTTPError]: Response code 404 (Not Found) for https://github.com/electron/electron/releases/download/v7.2.1/electron-v7.2.1-darwin-arm64.zip
    at EventEmitter.<anonymous> (/Users/pztrn/Library/Caches/Yarn/v6/.tmp/87cd208322c666ac5b5d0473c4474f55.65ffa894bf635745d9399e79fb38682ccfd9c6e0.prepare/node_modules/got/source/as-stream.js:35:24)
    at EventEmitter.emit (node:events:527:28)
    at module.exports (/Users/pztrn/Library/Caches/Yarn/v6/.tmp/87cd208322c666ac5b5d0473c4474f55.65ffa894bf635745d9399e79fb38682ccfd9c6e0.prepare/node_modules/got/source/get-response.js:22:10)
    at ClientRequest.handleResponse (/Users/pztrn/Library/Caches/Yarn/v6/.tmp/87cd208322c666ac5b5d0473c4474f55.65ffa894bf635745d9399e79fb38682ccfd9c6e0.prepare/node_modules/got/source/request-as-event-emitter.js:155:5)
    at Object.onceWrapper (node:events:642:26)
    at ClientRequest.emit (node:events:539:35)
    at origin.emit (/Users/pztrn/Library/Caches/Yarn/v6/.tmp/87cd208322c666ac5b5d0473c4474f55.65ffa894bf635745d9399e79fb38682ccfd9c6e0.prepare/node_modules/@szmarczak/http-timer/source/index.js:37:11)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:631:27)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:117:17)
    at TLSSocket.socketOnData (node:_http_client:494:22)

... and more irrelevant log lines there.
@pztrn pztrn added the bug Something isn't working label May 30, 2022
@pztrn
Copy link
Contributor Author

pztrn commented May 30, 2022

Probably figured it out. Sonixd is not compatible with node 18 (at least in main branch).

Done:

brew link --overwrite node@14

And everything went okay.

@pztrn
Copy link
Contributor Author

pztrn commented May 30, 2022

Also I have to install python 3 from brew and do this:

ln -s /opt/homebrew/bin/python3 /opt/homebrew/bin/python

Otherwise it throws error when trying to compile lzma-native which needs python binary named as python (right now only python3 is available on macOS).

For those who knows - this approach:

PYTHON=/opt/homebrew/bin/python3 yarn install

won't work!

@pztrn pztrn changed the title yarn install tries to download electron 7.2.1 yarn install problems on macOS 12+ May 30, 2022
@pztrn
Copy link
Contributor Author

pztrn commented May 30, 2022

Also, electron-builder should be upgraded to at least 23.0.2: electron-userland/electron-builder#6606

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant