Repository: TryQuiet/quiet

Issue #1213: Developer setup on Apple silicon (M1, M2, arm64) doesn't just work
Created: 2023-02-11T11:43:36Z
NOTE: (from @holmesworcester) someone should get the M1 mac in the office and debug this, either fixing things so that the default dev instructions just work (preferred) or—if it's a much easier path—including instructions in the desktop README for M1/M2 users.
...
I got a new M2 MacBook Air and had trouble running npm run lerna bootstrap as of cbc0c1d:
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /Users/pdurbin/.npm/_cacache/tmp/git-clonexHcdWz/node_modules/go-ipfs
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c node src/post-install.js
npm ERR! npm ERR! https://dist.ipfs.io/go-ipfs/versions
npm ERR! npm ERR! Error: No binary available for arch 'undefined'
npm ERR! npm ERR!     at getDownloadURL (/Users/pdurbin/.npm/_cacache/tmp/git-clonexHcdWz/node_modules/go-ipfs/src/download.js:131:11)
npm ERR! npm ERR!     at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm ERR! npm ERR!     at async download (/Users/pdurbin/.npm/_cacache/tmp/git-clonexHcdWz/node_modules/go-ipfs/src/download.js:139:15)
npm ERR! npm ERR!     at async module.exports (/Users/pdurbin/.npm/_cacache/tmp/git-clonexHcdWz/node_modules/go-ipfs/src/download.js:196:13)
npm ERR! 
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR!     /Users/pdurbin/.npm/_logs/2023-02-11T02_48_34_696Z-debug-0.log

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/pdurbin/.npm/_logs/2023-02-11T02_48_06_471Z-debug-0.log
lerna ERR! npm install exited 1 in '@quiet/backend'
lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.

When I run node -e "console.log(process.arch)" I get arm64.
From the log above, it looks like go-ipfs 0.9.1 is being pulled in...
grep 'fetch.*go-ipfs' /Users/pdurbin/.npm/_logs/2023-02-11T02_48_34_696Z-debug-0.log
3570 http fetch GET 200 https://registry.npmjs.org/go-ipfs/-/go-ipfs-0.9.1.tgz 7484ms (cache miss)
... and here's the No binary available for arch 'undefined' error: https://github.com/ipfs/npm-go-ipfs/blob/v0.9.1/src/download.js#L131
That error was also reported here: ipfs/npm-kubo#40 and was apparently fixed in ipfs/npm-kubo#44 which (based on dates of tags) seems to have been released in go-ipfs 0.12.0. So maybe upgrading go-ipfs will help? Or maybe I'm way off. 😅
Here's that log file mentioned above: 2023-02-11T02_48_34_696Z-debug-0.log.txt

Duplicate issue #1145: trouble getting a dev environment set up
Created: 2023-01-08T21:16:09Z
@holmesworcester encouraged me to work on an issue but I'm having trouble getting a dev environment set up. I'm on macOS 10.14.6
I'm on b599a1b on the "develop" branch and following packages/desktop/README.md
npm install went fine.
Here's the error:
$ npm run lerna bootstrap

> lerna
> lerna

lerna notice cli v4.0.0
lerna info versioning independent
lerna info Bootstrapping 9 packages
lerna info Installing external dependencies
lerna ERR! npm install exited 1 in 'quiet'
lerna ERR! npm install stderr:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @cypress/react@5.12.0
npm ERR! Found: @types/react@18.0.25
npm ERR! node_modules/@types/react
npm ERR!   dev @types/react@"^18.0.25" from the root project
npm ERR!   peerOptional @types/react@"^17.0.0 || ^18.0.0" from @mui/base@5.0.0-alpha.107
npm ERR!   node_modules/@mui/base
npm ERR!     @mui/base@"5.0.0-alpha.107" from @mui/lab@5.0.0-alpha.109
npm ERR!     node_modules/@mui/lab
npm ERR!       @mui/lab@"^5.0.0-alpha.109" from the root project
npm ERR!     @mui/base@"5.0.0-alpha.107" from @mui/material@5.10.15
npm ERR!     node_modules/@mui/material
npm ERR!       @mui/material@"~5.10.15" from the root project
npm ERR!       2 more (@mui/icons-material, @mui/lab)
npm ERR!   16 more (@mui/icons-material, @mui/lab, @mui/material, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional @types/react@"^16.9.16 || ^17.0.0" from @cypress/react@5.12.0
npm ERR! node_modules/@cypress/react
npm ERR!   dev @cypress/react@"5.12.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @types/react@17.0.52
npm ERR! node_modules/@types/react
npm ERR!   peerOptional @types/react@"^16.9.16 || ^17.0.0" from @cypress/react@5.12.0
npm ERR!   node_modules/@cypress/react
npm ERR!     dev @cypress/react@"5.12.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /Users/family/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/family/.npm/_logs/2023-01-08T18_29_29_059Z-debug-0.log
lerna ERR! npm install exited 1 in 'quiet'
lerna WARN complete Waiting for 3 child processes to exit. CTRL-C to exit immediately.

Here's the log mentioned in the error:
2023-01-08T18_29_29_059Z-debug-0.log.txt

Closing comment (2023-02-11T11:45:03Z): Thanks for the chatter here. I got a new laptop (and now have a different problem which I reported in #1213) and plan to focus my energy on getting a dev environment working there so I'm closing this issue.