我正试图使用github在netlify上部署一个gatsby项目。一切都很好,但最终我还是面临着这些问题。
9:32:45 AM: node: symbol lookup error: /opt/build/repo/node_modules/gatsby-source-contentful/node_modules/sharp/build/Release/sharp.node: undefined symbol: vips_foreign_heif_compression_get_type
9:32:45 AM: Skipping functions preparation step: no functions directory set
9:32:45 AM: Caching artifacts
9:32:45 AM: Started saving node modules
9:32:45 AM: Finished saving node modules
9:32:45 AM: Started saving pip cache
9:32:45 AM: Finished saving pip cache
9:32:45 AM: Started saving emacs cask dependencies
9:32:45 AM: Finished saving emacs cask dependencies
9:32:45 AM: Started saving maven dependencies
9:32:45 AM: Finished saving maven dependencies
9:32:45 AM: Started saving boot dependencies
9:32:45 AM: Finished saving boot dependencies
9:32:45 AM: Started saving go dependencies
9:32:45 AM: Finished saving go dependencies
9:32:48 AM: Error running command: Build script returned non-zero exit code: 127
9:32:48 AM: Failing build: Failed to build site
9:32:49 AM: failed during stage 'building site': Build script returned non-zero exit code: 127
9:32:49 AM: Finished processing build request in 1m36.385195021s
如何修复符号查找错误:/opt/build/repo/nod_module/gatsby source contentful/nod_module/sharp/build/Release/sharp.node:undefined symbol:vips_foreign_heif_compression_get_type
这只是包版本中的冲突,似乎存在版本不匹配。通过更新的所有软件包解决了这个问题
npm update