Локально (используя 'gatsby development') он работает нормально, но когда я развертываюсь в Netlify с помощью 'gatsby build', я получаю эту ошибку:
########################################################################
6:15:57 AM: ⚠ mozjpeg pre-build test failed
6:15:57 AM: ℹ compiling from source
6:16:33 AM: ✔ mozjpeg built successfully
6:16:33 AM: > pngquant-bin@5.0.0 postinstall /opt/build/repo/node_modules/pngquant-bin
6:16:33 AM: > node lib/install.js
6:16:34 AM: ✔ pngquant pre-build test passed successfully
6:16:42 AM: npm
6:16:42 AM: WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
6:16:42 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
6:16:42 AM: added 1945 packages from 1150 contributors and audited 27946 packages in 94.548s
6:16:42 AM: found 5 moderate severity vulnerabilities
6:16:42 AM: run `npm audit fix` to fix them, or `npm audit` for details
6:16:42 AM: NPM modules installed
6:16:42 AM: Started restoring cached go cache
6:16:42 AM: Finished restoring cached go cache
6:16:42 AM: unset GOOS;
6:16:42 AM: unset GOARCH;
6:16:42 AM: export GOROOT='/opt/buildhome/.gimme/versions/go1.10.linux.amd64';
6:16:42 AM: export PATH="/opt/buildhome/.gimme/versions/go1.10.linux.amd64/bin:${PATH}";
6:16:42 AM: go version >&2;
6:16:42 AM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.10.linux.amd64.env';
6:16:42 AM: go version go1.10 linux/amd64
6:16:42 AM: Installing missing commands
6:16:42 AM: Verify run directory
6:16:43 AM: Executing user command: gatsby build
6:16:45 AM: success open and validate gatsby-config — 0.017 s
6:16:45 AM: Your plugins must export known APIs from their gatsby-node.js.
6:16:45 AM: The following exports aren't APIs. Perhaps you made a typo or your plugin is outdated?
6:16:45 AM: See https://www.gatsbyjs.org/docs/node-apis/ for the list of Gatsby Node APIs
6:16:45 AM: - Your site's gatsby-node.js is exporting "modifyWebpackConfig" which was removed in Gatsby v2. Refer to the migration guide for more info on upgrading to "onCreateWebpackConfig":
6:16:45 AM: https://gatsby.app/update-webpack-config
6:16:45 AM: Caching artifacts
6:16:45 AM: Started saving node modules
6:16:45 AM: Finished saving node modules
6:16:45 AM: Started saving pip cache
6:16:45 AM: Finished saving pip cache
6:16:45 AM: Started saving emacs cask dependencies
6:16:45 AM: Finished saving emacs cask dependencies
6:16:45 AM: Started saving maven dependencies
6:16:45 AM: Finished saving maven dependencies
6:16:45 AM: Started saving boot dependencies
6:16:45 AM: Finished saving boot dependencies
6:16:45 AM: Started saving go dependencies
6:16:45 AM: Finished saving go dependencies
6:16:46 AM: Cached node version v8.12.0
6:16:46 AM: Error running command: Build script returned non-zero exit code: 1
6:16:46 AM: Failing build: Failed to build site
6:16:46 AM: failed during stage 'building site': Build script returned non-zero exit code: 1
6:16:46 AM: Finished processing build request in 1m47.357793899s
Сделали все стандартные вещи, такие как переустановка node и npm (как я думал, это может быть проблемой), но через несколько недель я совершенно озадачен тем, что это за проблема. Точно так же в Интернете не так много документации, настолько застрявшей, чтобы даже начать с решения этой проблемы.