由于 sharp-libvips 的下载安装失败导致。删除已有的 libvips 安装包,重新安装 gatsby 成功。
$ ls ~/.npm/_libvips/
libvips-8.7.4-darwin-x64.tar.gz libvips-8.9.0-darwin-x64.tar.gz
$ rm ~/.npm/_libvips/*
$ npm init gatsby
Thanks! Here's what we'll now do:
🛠 Create a new Gatsby site in the folder project-shenjie-frontend
🎨 Get you set up to use PostCSS for styling your site
🔌 Install gatsby-plugin-image
✔ Shall we do this? (Y/n) · Yes
✔ Created site from template
❯ Installing Gatsby...
✔ Installed Gatsby
✔ Installed plugins
✔ Created site in project-shenjie-frontend
🔌 Setting-up plugins...
info Adding gatsby-plugin-postcss
info Adding gatsby-plugin-image
info Adding gatsby-plugin-sharp
info Adding gatsby-transformer-sharp
info Adding gatsby-source-filesystem
info Installed gatsby-plugin-postcss in gatsby-config
success Adding gatsby-plugin-postcss to gatsby-config - 0.200s
info Installed gatsby-plugin-image in gatsby-config
success Adding gatsby-plugin-image to gatsby-config - 0.183s
info Installed gatsby-plugin-sharp in gatsby-config
success Adding gatsby-plugin-sharp to gatsby-config - 0.186s
info Installed gatsby-transformer-sharp in gatsby-config
success Adding gatsby-transformer-sharp to gatsby-config - 0.187s
info Installed gatsby-source-filesystem in gatsby-config
success Adding gatsby-source-filesystem (images) to gatsby-config - 0.185s
🎉 Your new Gatsby site has been successfully created
at /Users/incpad08/src/project-shenjie-frontend.
Start by going to the directory with
cd project-shenjie-frontend
Start the local development server with
npm run develop
See all commands at
https://www.gatsbyjs.com/docs/gatsby-cli/