freeCodeCamp: Unable to run `npm run develop` on Apple MacBook M1 Chip due to sharp

Describe the bug I am setting up the freecodecamp platform on my local following the instructions from https://contribute.freecodecamp.org/#/how-to-setup-freecodecamp-locally. I get this issue when I run npm run develop.

Clipboard - July 11, 2021 6_45 PM

I have tried solutions given in below links:

  1. https://stackoverflow.com/questions/67560211/mac-m1-something-went-wrong-installing-the-sharp-module
  2. https://github.com/gatsbyjs/gatsby/issues/30807

Still no luck. I also tried running the terminal on Rosetta, that also gave the same error.

Desktop (please complete the following information): MacBook Air (M1, 2020) 11.4 (20F71)

$ node -v
v12.21.0

$ npm -v
6.14.11

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 18 (18 by maintainers)

Most upvoted comments

Hey @vishwasnavadak,

Nice to hear that it worked!

I don’t think we need to add it in the contributors’ guide because of the userbase being so small. Also, Node might update and the instructions could go out of date fast.

You can always open a PR and we will review it.

Have a nice day and looking forward to your contributions!

Perfect and also I think it would be better to add a small note in the “Troubleshooting” part of the contribution docs.

Good that you recalled. Updating to node v14.17 worked!!

PS: arch command output

$ arch
arm64

Do you think we need to update https://contribute.freecodecamp.org/#/how-to-setup-freecodecamp-locally page for M1 users?