Ошибка при запуске `gatsby build` с Kentico Kontent

У меня есть проект, в котором используются как Gatsby, так и Kentico Kontent. Я хорошо работал в разработке, используя как gatsby develop, так и npm run develop на моем локальном компьютере (Windows 10). Обычно результат выглядит так:

$ npm run develop success open and validate gatsby-configs — 0.169s success load plugins — 0.426s success onPreInit — 0.004s success initialize cache — 0.007s success copy gatsby files — 0.067s success onPreBootstrap — 1.357s success createSchemaCustomization — 0.545s success source and transform nodes — 1.740s success building schema — 0.358s success createPages — 0.068s success createPagesStatefully — 0.063s success onPreExtractQueries — 0.002s success update schema — 0.030s success extract queries from components — 0.177s success write out requires — 0.027s success write out redirect data — 0.007s success onPostBootstrap — 0.003s ⠀ info bootstrap finished — 7.596 s ⠀ success run queries — 0.125s — 61/61 489.34/s ⠀ You can now view <project name> in the browser. ⠀ https://localhost:8000/ ⠀ View GraphiQL, an in-browser IDE, to explore your site’s data and schema ⠀ https://localhost:8000/___graphql ⠀ Note that the development build is not optimized. To create a production build, use gatsby build ⠀ success Building development bundle — 3.319s

Когда я запускаю gatsby build или npm run build, это всегда не удается, и я вижу следующую ошибку / вывод:

$ npm run build > <project name>@1.1.1 build C:projects<client><project name> > gatsby build success open and validate gatsby-configs — 0.155s success load plugins — 0.435s success onPreInit — 0.004s success delete html and css files from previous builds — 0.019s success initialize cache — 0.008s success copy gatsby files — 0.076s success onPreBootstrap — 0.028s ERROR #11321 PLUGIN «@kentico/gatsby-source-kontent» threw an error while running the createSchemaCustomization lifecycle: not finished createSchemaCustomization — 0.549s npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! <project name>@1.1.1 build: `gatsby build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the <project name>@1.1.1 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:UsersmattnAppDataRoamingnpm-cache_logs2020-03-24T12_10_17_984Z-debug.log

Глядя на предложенный файл журнала, я вижу:

0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli ‘C:\Program Files\nodejs\node.exe’, 1 verbose cli ‘C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js’, 1 verbose cli ‘run’, 1 verbose cli ‘build’ 1 verbose cli ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ ‘prebuild’, ‘build’, ‘postbuild’ ] 5 info lifecycle <project name>@1.1.1~prebuild: <project name>@1.1.1 6 info lifecycle <project name>@1.1.1~build: <project name>@1.1.1 7 verbose lifecycle <project name>@1.1.1~build: unsafe-perm in lifecycle true 8 verbose lifecycle <project name>@1.1.1~build: PATH: <My Env Variables Path> 9 verbose lifecycle <project name>@1.1.1~build: CWD: C:projects<client><project name> 10 silly lifecycle <project name>@1.1.1~build: Args: [ ‘/d /s /c’, ‘gatsby build’ ] 11 silly lifecycle <project name>@1.1.1~build: Returned: code: 1 signal: null 12 info lifecycle <project name>@1.1.1~build: Failed to exec build script 13 verbose stack Error: [email protected] build: `gatsby build` 13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecycleindex.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:311:20) 13 verbose stack at ChildProcess.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecyclelibspawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:311:20) 13 verbose stack at maybeClose (internal/child_process.js:1021:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) 14 verbose pkgid <project name>@1.1.1 15 verbose cwd C:projects<client><project name> 16 verbose Windows_NT 10.0.18362 17 verbose argv «C:\Program Files\nodejs\node.exe» «C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js» «run» «build» 18 verbose node v12.16.1 19 verbose npm v6.13.4 20 error code ELIFECYCLE 21 error errno 1 22 error <project name>@1.1.1 build: `gatsby build` 22 error Exit status 1 23 error Failed at the <project name>@1.1.1 build script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

Есть ли другой способ получить подробную информацию об ошибке, чтобы я мог найти решение? Я пробовал обновлять и устанавливать пакеты npm и запускать «чистый» проект gatsby, но, похоже, ничего не помогает.

Источник: ledsshop.ru

Стиль жизни - Здоровье!