question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

yarn install fails on m1

See original GitHub issue

Environment:

  • 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:closed
  • Created 2 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
sharpcommented, Dec 14, 2021

same issue. node v16 seems to work.

3reactions
proleetcommented, Dec 3, 2021

Dealing with the same issue right now. 😦

branch v3.0.0 seems to work.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found