Сборка локально работает нормально, используя gatsby development, но когда я пытаюсь развернуть веб-сайт в Netlify .. процесс сборки завершается с ошибкой:
10:30:31 PM: error #98123 WEBPACK
10:30:31 PM: Generating JavaScript bundles failed
10:30:31 PM: Can't resolve 'rehype-React' in '/opt/build/repo/src/components'
10:30:31 PM: File: src/components/PostContent.tsx
10:30:31 PM: See our docs page for more info on this error: https://gatsby.dev/issue-how-to
10:30:31 PM: error #98123 WEBPACK
10:30:31 PM: Generating JavaScript bundles failed
10:30:31 PM: component---src-pages-about-tsx-c81cc477e116f4e4be2b.js from Terser
10:30:31 PM: Unexpected token: operator (!) [./src/components/PostContent.tsx:547,22][component---src-pages-about-tsx-c81cc477e116f4e4be2b.js:613,20]
10:30:31 PM: See our docs page for more info on this error: https://gatsby.dev/issue-how-to
10:30:31 PM: error #98123 WEBPACK
10:30:31 PM: Generating JavaScript bundles failed
10:30:31 PM: component---src-pages-contact-us-tsx-6ab68174ee483a6a0a25.js from Terser
10:30:31 PM: Unexpected token: operator (!) [./src/components/PostContent.tsx:547,22][component---src-pages-contact-us-tsx-6ab68174ee483a6a0a25.js:616,20]
10:30:31 PM: See our docs page for more info on this error: https://gatsby.dev/issue-how-to
10:30:31 PM: error #98123 WEBPACK
10:30:31 PM: Generating JavaScript bundles failed
10:30:31 PM: component---src-pages-privacy-policy-tsx-600b74e546bdcadf6631.js from Terser
10:30:31 PM: Unexpected token: operator (!) [./src/components/PostContent.tsx:547,22][component---src-pages-privacy-policy-tsx-600b74e546bdcadf6631.js:613,20]
10:30:31 PM: See our docs page for more info on this error: https://gatsby.dev/issue-how-to
10:30:31 PM: error #98123 WEBPACK
10:30:31 PM: Generating JavaScript bundles failed
10:30:31 PM: component---src-pages-terms-of-use-tsx-c1df1319b4c6cab5d9cb.js from Terser
10:30:31 PM: Unexpected token: operator (!) [./src/components/PostContent.tsx:547,22][component---src-pages-terms-of-use-tsx-c1df1319b4c6cab5d9cb.js:616,20]
10:30:31 PM: See our docs page for more info on this error: https://gatsby.dev/issue-how-to
10:30:31 PM: error #98123 WEBPACK
10:30:31 PM: Generating JavaScript bundles failed
10:30:31 PM: component---src-templates-post-tsx-27e48f1f132dc87ac680.js from Terser
10:30:31 PM: Unexpected token: operator (!) [./src/components/PostContent.tsx:547,22][component---src-templates-post-tsx-27e48f1f132dc87ac680.js:547,20]
10:30:31 PM: See our docs page for more info on this error: https://gatsby.dev/issue-how-to
10:30:32 PM: Skipping functions preparation step: no functions directory set
10:30:32 PM: Caching artifacts
10:30:32 PM: Started saving node modules
10:30:32 PM: Finished saving node modules
10:30:32 PM: Started saving pip cache
10:30:32 PM: Finished saving pip cache
10:30:32 PM: Started saving emacs cask dependencies
10:30:32 PM: Finished saving emacs cask dependencies
10:30:32 PM: Started saving maven dependencies
10:30:32 PM: Finished saving maven dependencies
10:30:32 PM: Started saving boot dependencies
10:30:32 PM: Finished saving boot dependencies
10:30:32 PM: Started saving go dependencies
10:30:32 PM: Finished saving go dependencies
10:30:35 PM: Error running command: Build script returned non-zero exit code: 1
10:30:35 PM: Failing build: Failed to build site
10:30:35 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
10:30:35 PM: Finished processing build request in 1m32.133169646s
Перед тем, как опубликовать этот вопрос, я попытался много решений, таких как использование правильного регистра, который был наиболее распространенным явлением, связанным с этим сообщением об ошибке
Я думаю, что эта ошибка связана с rehype-React?
Есть идеи?