Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
571 views
in Technique[技术] by (71.8m points)

favicon - dyld: lazy symbol binding failed: Symbol not found: _node_module_register Gatsby realated

As I cannot comment because of my low reputation I have added this question so I can set my own answer. I hope this can solve issues for other developers.

I got this error: dyld: lazy symbol binding failed: Symbol not found: _node_module_register Gatsby realated I am working with Gatsbyjs. The error appears when trying to run develop. Basically on this case it was because I have added the plugin: "gatsby-plugin-manifest" later on. I believe the problem was because some dependencies used by this plugin-manifest are also used by this another plugin: "gatsby-plugin-sharp". They both can set the favicon to the webpage. So my solution was:

  • Reinstall the plugin "gatsby-plugin-sharp" just by running -> npm install --save gatsby-plugin-sharp

By doing this, now I was able to run npm run develop.

Why posting about this Basically we know that a particular issue may be related to many things. This is why I posted this solution for this particular problem. Some other solutions tell about remove the node_modules folder and run again npm install to install all the modules quoted in package.json but in my case I wanted to try another solution because some of the plugin I am using I don't need them to get updated

Well hope this help others.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Just for the sake of my own programming. I will reply myself.

In deed this issue is caused for the libvips 8.9.0+ which is installed globally, at least under MacOS. So the solution that worked for me is the same as stated in this github issue

Solution run the following command inside of the gatsby app folder:

rm -rf node_modules && SHARP_IGNORE_GLOBAL_LIBVIPS=true yarn

Note: this command will remove the folder node_modules, then, it will set the sharp global lib installed as ignored for this installation and it will run yarn.

After doing that you should be able to run:

yarn start

Good luck! May the force be with Us.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...