[英]dyld: lazy symbol binding failed
I am running into a weird error when i try to run gatsby develop
inside a newly created gatsby project.当我尝试在新创建的 gatsby 项目中运行
gatsby develop
时,我遇到了一个奇怪的错误。
This should not have anything to do with gatsby.js (a static site generator), since I have been getting the same error on different occasions as well.这应该与 gatsby.js(一个 static 网站生成器)没有任何关系,因为我在不同的场合也遇到过同样的错误。
When I run gatsby develop
in one of my old projects, this error does not occur.当我在我的一个旧项目中运行
gatsby develop
时,不会发生此错误。
~/Code/hzr (master) » gatsby develop
success compile gatsby files - 0.996s
success load gatsby config - 0.076s
⠋ load plugins
dyld: lazy symbol binding failed: Symbol not found: _pthread_jit_write_protect_supported_np
Referenced from: /Users/hzr/Code/hzr/node_modules/sharp/build/Release/../.././vendor/8.13.3/darwin-x64/lib/libvips-cpp.42.dylib
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _pthread_jit_write_protect_supported_np
Referenced from: /Users/hzr/Code/hzr/node_modules/sharp/build/Release/../.././vendor/8.13.3/darwin-x64/lib/libvips-cpp.42.dylib
Expected in: /usr/lib/libSystem.B.dylib
I also get the same error when I try to start a strapi project:当我尝试启动一个 strapi 项目时,我也遇到了同样的错误:
~ » npx create-strapi-app@latest my-project --quickstart hzr@badlands
Creating a quickstart project.
Creating a new Strapi application at /Users/hzr/my-project.
Creating files.
Dependencies installed successfully.
Your application was created at /Users/hzr/my-project.
Available commands in your project:
npm run develop
Start Strapi in watch mode. (Changes in Strapi project files will trigger a server restart)
npm run start
Start Strapi without watch mode.
npm run build
Build Strapi admin panel.
npm run strapi
Display all available commands.
You can start by doing:
cd /Users/hzr/my-project
npm run develop
Running your Strapi application.
> my-project@0.1.0 develop
> strapi develop
Building your admin UI with development configuration...
Admin UI built successfully
dyld: lazy symbol binding failed: Symbol not found: _pthread_jit_write_protect_supported_np
Referenced from: /Users/hzr/my-project/node_modules/sharp/build/Release/../.././vendor/8.13.3/darwin-x64/lib/libvips-cpp.42.dylib
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _pthread_jit_write_protect_supported_np
Referenced from: /Users/hzr/my-project/node_modules/sharp/build/Release/../.././vendor/8.13.3/darwin-x64/lib/libvips-cpp.42.dylib
Expected in: /usr/lib/libSystem.B.dylib
Does anyone have an idea what could cause this error?有谁知道什么可能导致此错误?
I am on MacOS Catalina Version 10.15.7我使用的是 MacOS Catalina 版本 10.15.7
Please let me know if you need any further information.如果您需要任何进一步的信息,请告诉我。
And thank you in advance.提前谢谢你。
I searched for the error online so far none of the suggested actions have worked.到目前为止,我在网上搜索了错误,但所有建议的操作都没有奏效。
Un- and reinstalling sharp did not fix the issue.卸载并重新安装 sharp 并不能解决问题。
Un- and reinstalling node did not fix the issue.卸载并重新安装节点没有解决问题。
Problem is with version of dependency name sharp.问题出在依赖名称 sharp 的版本上。
Update your package.lock.json file or yarn.lock file to use the sharp version to "0.31.1".更新您的 package.lock.json 文件或 yarn.lock 文件以使用 sharp 版本为“0.31.1”。
Here is how to do it.这是如何做的。
In yarn.lock.json file Replace在 yarn.lock.json 文件中替换
Than比
yarn install纱线安装
This solved my issue on mac catalina 10.15这解决了我在 mac catalina 10.15 上的问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.