gatsby 安装依赖失败 -- 解决方案
项目根目录添加 .npmrc
yarn 会读取 .npmrc 文件,不需要单独添加 .yarnrc
registry=https://registry.npm.taobao.org sass_binary_site=https://npm.taobao.org/mirrors/node-sass/ phantomjs_cdnurl=http://cnpmjs.org/downloads electron_mirror=https://npm.taobao.org/mirrors/electron/ sqlite3_binary_host_mirror=https://foxgis.oss-cn-shanghai.aliyuncs.com/ profiler_binary_host_mirror=https://npm.taobao.org/mirrors/node-inspector/ chromedriver_cdnurl=https://cdn.npm.taobao.org/dist/chromedriver sharp_binary_host=https://npm.taobao.org/mirrors/sharp sharp_libvips_binary_host=https://npm.taobao.org/mirrors/sharp-libvips
注:node 版本需要固定为 v12.22.12
注:gatsby develop 启动项目,默认只能通过 localhost 文件,如果希望通过本地 IP 访问,则需要添加 gatsby develop --host=0.0.0.0