Как я могу добавить vendor / lib / libvips.42.dylib ”в путь node_modules / sharp / build / Release /../../“?

Как я могу добавить vendor / lib / libvips.42.dylib ”в путь node_modules / sharp / build / Release /../../“ ????

Я создаю веб-сайт с помощью gatsby, и мне нужно было установить два плагина gatsby

  1. npm установить gatsby-plugin-offline
  2. npm установить gatsby-plugin-manifest

После их успешной установки я написал настройки для них в gatsby-config.js, а затем дал gatsby develop в терминале. Но у меня есть ошибки ниже.


success open and validate gatsby-configs - 0.050s

⠁ dyld: lazy symbol binding failed: Symbol not found: _g_once_impl

  Referenced from: /Users/home/Downloads/gatsbyjs-website/gatsbyjs-book-master/mysite/node_modules/gatsby-plugin-manifest/node_modules/sharp/build/Release/sharp.node

  Expected in: /Users/home/Downloads/gatsbyjs-website/gatsbyjs-book-master/mysite/node_modules/sharp/build/Release/../../vendor/lib/libvips.42.dylib


dyld: Symbol not found: _g_once_impl

  Referenced from: /Users/home/Downloads/gatsbyjs-website/gatsbyjs-book-master/mysite/node_modules/gatsby-plugin-manifest/node_modules/sharp/build/Release/sharp.node

  Expected in: /Users/home/Downloads/gatsbyjs-website/gatsbyjs-book-master/mysite/node_modules/sharp/build/Release/../../vendor/lib/libvips.42.dylib


Killed: 9

Судя по ошибкам, мне кажется, что я должен добавить vendor / lib / libvips.42.dylib ”в путь node_modules / sharp / build / Release /../../“

Итак, как мне добавить vendor / lib / libvips.42.dylib »в путь node_modules / sharp / build / Release /../../« ????

моя версия узла - 11.13.0

Я установил плагины, пока

  • Гэтсби-плагин-острый
  • Гэтсби-трансформер-острый
  • исходная файловая система gatsby
  • Гэтсби-плагин-реакция-Хелемт
  • gatsby-plugin-manifest
  • гастби-плагин-офлайн

мой package.json

{
"name": "gatsby-starter-hello-world",
"private": true,
"description": "A simplified bare-bones starter for Gatsby",
"version": "0.1.0",
"license": "0BSD",
"scripts": {
"build": "gatsby build",
"develop": "gatsby develop",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
"start": "npm run develop",
"serve": "gatsby serve",
"clean": "gatsby clean",
"test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\" && exit 1"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.32",
"@fortawesome/free-brands-svg-icons": "^5.15.1",
"@fortawesome/free-solid-svg-icons": "^5.15.1",
"@fortawesome/react-fontawesome": "^0.1.12",
"gatsby": "^2.27.0",
"gatsby-image": "^2.5.0",
"gatsby-plugin-manifest": "^2.7.0",
"gatsby-plugin-offline": "^3.5.0",
"gatsby-plugin-react-helmet": "^3.5.0",
"gatsby-plugin-sharp": "^2.8.0",
"gatsby-source-filesystem": "^2.5.0",
"gatsby-transformer-sharp": "^2.6.0",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-helmet": "^6.1.0"
},
"devDependencies": {
"prettier": "2.1.2"
},
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby-starter-hello-world"
},
"bugs": {
"url": "https://github.com/gatsbyjs/gatsby/issues"
}

}

Буду признателен, если вы дадите мне совет или поможете. Заранее спасибо.


person tomoya takinami    schedule 26.11.2020    source источник
comment
Вы можете предоставить свой gatsby-config.js?   -  person Ferran Buireu    schedule 27.11.2020
comment
@FerranBuireu извините за поздний ответ. Я нашел решение, и мне нужно было установить все плагины в моем проекте, который зависит от «Sharp». Ссылка = ›(gatsbyjs.com/plugins/gatsby- plugin-offline /). Спасибо! :)   -  person tomoya takinami    schedule 21.01.2021


Ответы (1)


Проблема решена установкой всех зависимостей и всех связанных библиотек. Для получения дополнительной информации проверьте: https://www.gatsbyjs.com/plugins/gatsby-plugin-offline/?=gatsby-plugin-offline.

person Ferran Buireu    schedule 21.01.2021