next-saas-starter icon indicating copy to clipboard operation
next-saas-starter copied to clipboard

Build (and vercel deployment) fails: [slug].tsx:23:18 Type error: Property 'query' does not exist on type 'never'.

Open tom-s07 opened this issue 2 years ago • 1 comments
trafficstars

$ yarn build
yarn run v1.22.19
$ yarn tinacms server:start -c "next build"
$ /workspaces/website/node_modules/.bin/tinacms server:start -c 'next build'

server:start will be deprecated in the future, please use `tinacms dev` instead
        Typescript types => /workspaces/website/.tina/__generated__/types.ts
        GraphQL types ====> /workspaces/website/.tina/__generated__/schema.gql

Indexing local files ⠋
Starting Tina asset server
Visit the GraphQL playground at http://localhost:4001/altair/
or
Enter the CMS at [your-development-url]/admin/index.html 

warn  - SWC minify release candidate enabled. https://nextjs.org/docs/messages/swc-minify-enabled
Browserslist: caniuse-lite is outdated. Please run:
  npx browserslist@latest --update-db
  Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
Failed to compile.

./pages/blog/[slug].tsx:23:18
Type error: Property 'query' does not exist on type 'never'.

  21 |   
  22 |   const { data } = useTina({
> 23 |     query: props.query,
     |                  ^
  24 |     variables: props.variables,
  25 |     data: props.data,
  26 |   });
info  - Checking validity of types .child process exited with code 1
error Command failed with exit code 1.

tom-s07 avatar Dec 06 '22 16:12 tom-s07

yarn dev works, but yarn build fails with above.

tom-s07 avatar Dec 06 '22 16:12 tom-s07