tina-cloud-starter: Failed to launch dev server on Windows

Got this error

Started Filesystem GraphQL server on port: 4001
Generating Tina config
Cannot find module 'D:\\Dev\\WebDev\\NextJS\\tina-cloud-starter\\.tina\\__generated__\\temp/schema.js'
Require stack:
- D:\Dev\WebDev\NextJS\tina-cloud-starter\node_modules\tina-graphql-gateway-cli\dist\index.js
- D:\Dev\WebDev\NextJS\tina-cloud-starter\node_modules\tina-graphql-gateway-cli\bin\tina-gql, exiting...
D:\Dev\WebDev\NextJS\tina-cloud-starter\node_modules\tina-graphql-gateway-cli\dist\index.js:1
Error: Cannot find module 'D:\\Dev\\WebDev\\NextJS\\tina-cloud-starter\\.tina\\__generated__\\temp/schema.js'
Require stack:
- D:\Dev\WebDev\NextJS\tina-cloud-starter\node_modules\tina-graphql-gateway-cli\dist\index.js
- D:\Dev\WebDev\NextJS\tina-cloud-starter\node_modules\tina-graphql-gateway-cli\bin\tina-gql
    at compile (D:\Dev\WebDev\NextJS\tina-cloud-starter\node_modules\tina-graphql-gateway-cli\dist\index.js:275:22)
    at async FSWatcher.<anonymous> (D:\Dev\WebDev\NextJS\tina-cloud-starter\node_modules\tina-graphql-gateway-cli\dist\index.js:511:9) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'D:\\Dev\\WebDev\\NextJS\\tina-cloud-starter\\node_modules\\tina-graphql-gateway-cli\\dist\\index.js',
    'D:\\Dev\\WebDev\\NextJS\\tina-cloud-starter\\node_modules\\tina-graphql-gateway-cli\\bin\\tina-gql'
  ]
}
Done in 21.12s.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 3
  • Comments: 40 (26 by maintainers)

Most upvoted comments

This might be related. Just forked the repository on Windows and ran yarn install and then yarn dev and got this error:

D:\Development\tina-cloud-starter>yarn dev
yarn run v1.22.10
$ yarn tina-gql server:start -c "next dev"
$ D:\Development\tina-cloud-starter\node_modules\.bin\tina-gql server:start -c "next dev"

Started Filesystem GraphQL server on port: 4001
Generating Tina config
Compiling...
Tina config ======> D:\Development\tina-cloud-starter\.tina\__generated__\config
Building schema...
Generating types...
Typescript types => D:\Development\tina-cloud-starter/.tina/__generated__/types.ts
GraphQL types ====> D:\Development\tina-cloud-starter/.tina/__generated__/schema.gql
node:events:355
      throw er; // Unhandled 'error' event
      ^

Error: spawn next ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
    at onErrorNT (node:internal/child_process:480:16)
    at processTicksAndRejections (node:internal/process/task_queues:81:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12)
    at onErrorNT (node:internal/child_process:480:16)
    at processTicksAndRejections (node:internal/process/task_queues:81:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn next',
  path: 'next',
  spawnargs: [ 'dev' ]
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Problem spotted, fix coming soon 😃

Bumping to "tina-graphql-gateway-cli": "0.2.49" now gives me this error using npm

npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "workspace:": workspace:packages/tina-graphql-helpers

yarn allows me to choose the package to install instead of crashing

Couldn't find any versions for "tina-graphql-helpers" that matches "workspace:packages/tina-graphql-helpers"
? Please choose a version of "tina-graphql-helpers" from this list: 0.0.22

And the duplicate issue https://github.com/tinacms/tina-graphql-gateway/issues/259 is still happening for me when I get it running again using yarn.

@MatteoGauthier This should be fixed now on the latest version. Let us know if you run into any more issues and thanks for letting us know about this one.

I think I tracked down the issue. We are not handling windows when using the fast-glob package should have a fix in soon

@mitchmac The problem with concurrently is during CI, we wouldn’t know when to shut down the GraphQL server. I believe James was playing around with this a while back but I don’t think he got it all the way sorted out.

@B-Stewart thanks for your report! There was an internal error with the way we where publishing our packages. This should be fixed if you update to the latest versions. I have made a PR that will force this https://github.com/tinacms/tina-cloud-starter/pull/91. If you want to upgrade now you can run

yarn upgrade-interactive

and chose all the tina packages.

You can also wait for the PR to me merged and then update your fork.

@calvary-tucson that might be related as well. We will do some internal testing with a windows machine sometime this week. For now you could also try updating and see if the Issue persists.

Opened up a new ticket related to my duplicate path issue as it’s kinda related to cross platform path handling, but needs to be fixed in the graphql package https://github.com/tinacms/tina-graphql-gateway/issues/259

Latest version the CLI too? https://www.npmjs.com/package/tina-graphql-gateway-cli (This might be a dev-dependency)