yarn install fails on m1
See original GitHub issueEnvironment:
- M1 Mac.
- Terminal, node, yarn all running natively (not via rosetta). I.e.:
yarn, v3.0.2, is in
/opt/homebrew/bin/yarn
node, v17.0.1, is in/opt/homebrew/bin/yarn
Steps to reproduce:
git clone https://github.com/substrate-developer-hub/substrate-front-end-template
cd substrate-front-end-template
yarn install
Result: I get errors for many dependencies, in this form:
...
➤ YN0013: │ @babel/plugin-syntax-optional-chaining@npm:7.8.3 can't be found in the cache and will be fetched from the remote registr
➤ YN0001: │ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:371:5)
at PassThrough.onclose (node:internal/streams/end-of-stream:122:30)
at PassThrough.emit (node:events:390:28)
at emitCloseNT (node:internal/streams/destroy:145:10)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
➤ YN0013: │ @babel/plugin-syntax-private-property-in-object@npm:7.14.5 can't be found in the cache and will be fetched from the remo
➤ YN0001: │ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:371:5)
at PassThrough.onclose (node:internal/streams/end-of-stream:122:30)
at PassThrough.emit (node:events:390:28)
at emitCloseNT (node:internal/streams/destroy:145:10)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
➤ YN0013: │ @babel/plugin-syntax-top-level-await@npm:7.14.5 can't be found in the cache and will be fetched from the remote registry
➤ YN0001: │ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:371:5)
at PassThrough.onclose (node:internal/streams/end-of-stream:122:30)
at PassThrough.emit (node:events:390:28)
at emitCloseNT (node:internal/streams/destroy:145:10)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
...
I suspect it is not related to my terminal/node/yarn because said applications work fine for my other work in react-native. Errors are not limited to babel dependencies, but also most others, including @ledgerhq, @jest, @hapi…
yarn install --verbose
returns Unknown Syntax Error: Unsupported option name ("--verbose").
although it does not do this with my React Native app. And there are no error logs in my project root directory.
Wondering if anyone has encountered this and have suggestions for a fix?
For now, npm install
and npm start
work without issue.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
yarn install fails on Apple M1 requiring latest node · Issue #3444
I've got a brand spanking new M1 MacBook Air that requires latest node to be installed. This means I can't run Backstage locally....
Read more >'yarn' error on a Macbook with M1 chip. bash - Stack Overflow
I am creating it using create-react-app. To execute this, after installing 'yarn', 'yarn start' is used to check the operation of the web...
Read more >Sharp error mac m1 - nvh95 Handbook
When running command yarn to install dependencies for a Gatsby project on Mac M1, I encounter this error with sharp:
Read more >How to fix “pod install” error in React Native on Mac M1
Install cocoapods again, but using brew this time, as it will install another version compatible with the architecture of your M1 CPU: brew...
Read more >Theia Community
node_modules/node-pty: Command failed. system info: Apple M1 ... Apple M1,Yarn fail with error: . ... Command: node scripts/install.js
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
same issue. node v16 seems to work.
Dealing with the same issue right now. 😦
branch
v3.0.0
seems to work.