Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update package version to fix m1 chip error #5710

Merged
merged 3 commits into from
Apr 1, 2022
Merged

Conversation

alantoa
Copy link
Contributor

@alantoa alantoa commented Mar 20, 2022

Description

Hi, maintainers, I'm a front-end developer, looking at this document to learn web3, thank you very much for your resources!

I‘m trying to update the documentation to help with the translation work, when I run yarn get error logs:

> [email protected] install /Users/joshua/Projects/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)

sharp: Using existing vendored libvips v8.12.1
  TOUCH Release/obj.target/libvips-cpp.stamp
  CC(target) Release/obj.target/nothing/node_modules/node-addon-api/nothing.o
  LIBTOOL-STATIC Release/nothing.a
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols)
  CXX(target) Release/obj.target/sharp-darwin-x64/src/common.o
../src/common.cc:24:10: fatal error: 'vips/vips8' file not found
#include <vips/vips8>
         ^~~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/sharp-darwin-x64/src/common.o] Error 1

Then I found the reason, sharp version must greater than v0.30.1 when use M1 chip.

Specific reason you can see lovell/sharp#3048, so I updated the package, and also upgraded the gatsby related packages.

Related Issue

lovell/sharp#3048
#3796

My system version

System: MacOS Monterey 12.2
Chip: Apple M1 Pro
Node: v16.14.0

@github-actions github-actions bot added the dependencies 📦 Changes related to project dependencies label Mar 20, 2022
@gatsby-cloud
Copy link

gatsby-cloud bot commented Mar 20, 2022

Gatsby Cloud Build Report

ethereum-org-website-dev

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 16m

Performance

Lighthouse report

Metric Score
Performance 🔶 20
Accessibility 💚 97
Best Practices 💚 93
SEO 🔶 85

🔗 View full report

@wackerow
Copy link
Member

Hey @alantoa, thanks for reporting! @samajammin @corwintines Are you folks getting any issues with the M1?

@wackerow
Copy link
Member

Ah, nevermind, I see the issue now, can review tomorrow =)

@alantoa
Copy link
Contributor Author

alantoa commented Mar 21, 2022

Thank you for work!

@corwintines
Copy link
Member

@alantoa I am running this on a M1 chip with this current package settings, but I havent updated to Montery yet either. Will take a closer look today as I ran into this issue initially when setting up my macbook as well though.

@alantoa
Copy link
Contributor Author

alantoa commented Mar 21, 2022

@corwintines Thank you!
I think this needs upgrade!

@pettinarip
Copy link
Member

Since we probably need to upgrade the sharp package, I would suggest to:

  1. Upgrade the necessary gatsby packages and remove the resolutions section (since it was a temp fix)
➜  ethereum-org-website git:(dev) yarn why sharp
...
=> Found "[email protected]"
info Reasons this module exists
   - "gatsby-plugin-manifest" depends on it
   - Hoisted from "gatsby-plugin-manifest#sharp"
   - Hoisted from "gatsby-plugin-sharp#sharp"
   - Hoisted from "gatsby-transformer-sharp#sharp"
   - Hoisted from "gatsby#gatsby-sharp#sharp"
...
  1. Only upgrade the necessary gatsby packages. There are a couple of major upgrades here, lets not do that in the scope of this PR if we don't need them.

To be clear, lets try to update these first 3 packages (gatsby-plugin-manifest, gatsby-plugin-sharp and gatsby-transformer-sharp), remove resolutions and see if that works.

@alantoa
Copy link
Contributor Author

alantoa commented Mar 24, 2022

Hi, @pettinarip, thank you for reply!
I changed it according to your method, it's work in M1 chip well down!
Now I submit a PR, If have any problem, I'll change it again.
Thank you!

@pettinarip
Copy link
Member

Nice! thanks @alantoa! I would like to see if this worked fine for @corwintines as well. Lets wait his confirmation and then I'm ok to merge it 🚀

@alantoa
Copy link
Contributor Author

alantoa commented Mar 26, 2022

Hi, @corwintines, excuse me, Is there any progress in this PR?
Because I also have to submit some docs PR, thank you!

@wackerow
Copy link
Member

Curious if anyone else has encountered this issue with an M1. @samajammin have you encountered this at all. Are you running macOS Monterey?

@alantoa If you have some other docs and this solution is working for you locally, feel free to just push a separate PR with the doc changes specifically and we can take a look.

@minimalsm minimalsm added the Status: Blocked 🛑 This is blocked label Mar 29, 2022
Copy link
Member

@pettinarip pettinarip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alantoa I made a cleanup on the yarn.lock file since it had a lot of changes that were not needed (probably because you had installed/uninstalled other packages before) and I bumped the code gatsby version that has sharp as a dependency too.

Thanks for the help! 💪🏼

@pettinarip pettinarip removed the Status: Blocked 🛑 This is blocked label Apr 1, 2022
@pettinarip pettinarip merged commit 54d15d4 into ethereum:dev Apr 1, 2022
@pettinarip
Copy link
Member

@all-contributors please add @alantoa for tool

@allcontributors
Copy link
Contributor

@pettinarip

I've put up a pull request to add @alantoa! 🎉

@ethereum ethereum deleted a comment from allcontributors bot Apr 1, 2022
@alantoa
Copy link
Contributor Author

alantoa commented Apr 2, 2022

@pettinarip I'm very happy to be merged! 🚀
Thank you!💕

@corwintines corwintines mentioned this pull request Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies 📦 Changes related to project dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants