scottyzen / woonuxt-settings

WordPress plugin to help setup WooNuxt
18 stars 5 forks source link

Build error on Netlify #5

Closed dimitrisurber closed 9 months ago

dimitrisurber commented 9 months ago

When I try to deploy the default to netlify with the "Deploy to netlify" I get the following error during initalization:

10:59:41 PM: > postinstall 10:59:41 PM: > nuxi prepare 10:59:50 PM: [error] GraphQL Document Validation failed with 2 errors; 10:59:50 PM: Error 0: Cannot query field "countryStates" on type "RootQuery". Did you mean "contentTypes"? 10:59:50 PM: at /opt/build/repo/woonuxt_base/queries/getStates.gql:2:3 10:59:50 PM: Error 1: Cannot query field "allowedCountries" on type "RootQuery". 10:59:50 PM: at /opt/build/repo/woonuxt_base/queries/getStates.gql:6:3 10:59:50 PM: Error 0: Cannot query field "countryStates" on type "RootQuery". Did you mean "contentTypes"? 10:59:50 PM: at woonuxt_base/queries/getStates.gql:2:3 10:59:50 PM: Error 1: Cannot query field "allowedCountries" on type "RootQuery". 10:59:50 PM: at woonuxt_base/queries/getStates.gql:6:3 10:59:50 PM: at executeCodegen (node_modules/@graphql-codegen/cli/esm/codegen.js:330:24) 10:59:50 PM: at async generate (node_modules/@graphql-codegen/cli/esm/generate-and-save.js:99:25) 10:59:50 PM: at async generate (node_modules/nuxt-graphql-client/dist/module.mjs:64:10) 10:59:50 PM: at async generateGqlTypes (node_modules/nuxt-graphql-client/dist/module.mjs:339:46) 10:59:50 PM: at async setup (node_modules/nuxt-graphql-client/dist/module.mjs:433:5) 10:59:50 PM: at async normalizedModule (node_modules/@nuxt/kit/dist/index.mjs:2112:17) 10:59:50 PM: at async installModule (node_modules/@nuxt/kit/dist/index.mjs:2415:95) 10:59:50 PM: at async initNuxt (node_modules/nuxt/dist/index.mjs:3827:7) 10:59:50 PM: at async loadNuxt (node_modules/nuxt/dist/index.mjs:3925:5) 10:59:50 PM: at async loadNuxt (node_modules/@nuxt/kit/dist/index.mjs:2570:19) 10:59:50 PM: at async Object.run (node_modules/nuxi/dist/chunks/prepare.mjs:56:18) 10:59:50 PM: at async runCommand$1 (node_modules/nuxi/dist/shared/nuxi.4fde776c.mjs:1648:16) 10:59:50 PM: at async runCommand$1 (node_modules/nuxi/dist/shared/nuxi.4fde776c.mjs:1639:11) 10:59:50 PM: at async runMain$1 (node_modules/nuxi/dist/shared/nuxi.4fde776c.mjs:1773:7) 10:59:50 PM: Error: GraphQL Document Validation failed with 2 errors; 10:59:50 PM: Error 0: Cannot query field "countryStates" on type "RootQuery". Did you mean "contentTypes"? 10:59:50 PM: at woonuxt_base/queries/getStates.gql:2:3 10:59:50 PM: Error 1: Cannot query field "allowedCountries" on type "RootQuery". 10:59:50 PM: at woonuxt_base/queries/getStates.gql:6:3 10:59:50 PM: at codegen (node_modules/@graphql-codegen/core/esm/codegen.js:79:19) 10:59:50 PM: at async process (node_modules/@graphql-codegen/cli/esm/codegen.js:284:60) 10:59:50 PM: at async Promise.all (index 0) 10:59:50 PM: at async node_modules/@graphql-codegen/cli/esm/codegen.js:296:41 10:59:50 PM: at async node_modules/@graphql-codegen/cli/esm/codegen.js:62:17 10:59:50 PM: at async Task.run (node_modules/listr2/dist/index.js:960:11) 10:59:50 PM: at async node_modules/p-map/index.js:57:22 10:59:50 PM: [error] GraphQL Document Validation failed with 2 errors; 10:59:50 PM: Error 0: Cannot query field "countryStates" on type "RootQuery". Did you mean "contentTypes"? 10:59:50 PM: at /opt/build/repo/woonuxt_base/queries/getStates.gql:2:3 10:59:50 PM: Error 1: Cannot query field "allowedCountries" on type "RootQuery". 10:59:50 PM: at /opt/build/repo/woonuxt_base/queries/getStates.gql:6:3 10:59:50 PM: npm ERR! code 1 10:59:50 PM: npm ERR! path /opt/build/repo 10:59:50 PM: npm ERR! command failed 10:59:50 PM: npm ERR! command sh -c nuxi prepare 10:59:50 PM: npm ERR! A complete log of this run can be found in: /opt/buildhome/.npm/_logs/2024-01-09T21_59_23_159Z-debug-0.log 10:59:50 PM: Error during npm install 10:59:50 PM: Failing build: Failed to install dependencies 10:59:50 PM: Failed during stage "Install dependencies": dependency_installation script returned non-zero exit code: 1

I don't find the strings "countryStates" or "allowedCountries" countries anywhere in the woonuxt_base so I assume it has to be a problem with a dependency that is loaded?

scottyzen commented 9 months ago

Hi @dimitrisurber,

I've made the (woonuxt-settings.zip) plugin to help get you up and running as easy as possible. That will show and help you to install the required plugins. If you are seeing that error you must not have the WooGrapghQL plugin installed.