Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using create-gatsy: TypeError: qi.cursorTo is not a function #37921

Closed
2 tasks done
0618 opened this issue Apr 7, 2023 · 3 comments
Closed
2 tasks done

Error when using create-gatsy: TypeError: qi.cursorTo is not a function #37921

0618 opened this issue Apr 7, 2023 · 3 comments
Labels
type: bug An issue or pull request relating to a bug in Gatsby

Comments

@0618
Copy link

0618 commented Apr 7, 2023

Preliminary Checks

Description

When running npx create-gatsby@latest -y my-gatsby on Github Workflow, got following error

TypeError: Xi.cursorTo is not a function
    at Timeout._onTimeout (/home/runner/.npm/_npx/fe8a8be88628f971/node_modules/create-gatsby/lib/index.js:5:854)
    at listOnTimeout (node:internal/timers:569:17)
    at process.processTimers (node:internal/timers:512:7)

Same as #35426

Reproduction Link

https://github.com/0618/amplify-ui/actions/runs/4634161974/jobs/8200091938

Steps to Reproduce

  1. In Github workflow, set Node version to be 18
  2. run npx create-gatsby@latest -y my-gatsby

Expected Result

Shouldn't crash

Actual Result

See error

TypeError: Xi.cursorTo is not a function
    at Timeout._onTimeout (/home/runner/.npm/_npx/fe8a8be88628f971/node_modules/create-gatsby/lib/index.js:5:854)
    at listOnTimeout (node:internal/timers:569:17)
    at process.processTimers (node:internal/timers:512:7)

Environment

Operating System
  Ubuntu
  22.04.2
  LTS
Runner Image
  Image: ubuntu-22.04
  Version: 20230402.1
  Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20230402.1/images/linux/Ubuntu2204-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20230402.1
Node.js v18.15.0

Config Flags

No response

@0618 0618 added the type: bug An issue or pull request relating to a bug in Gatsby label Apr 7, 2023
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Apr 7, 2023
@LekoArts LekoArts removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Apr 11, 2023
@LekoArts
Copy link
Contributor

Hi, thanks for the issue!

As explained in the old issue, please try #35426 (comment). Our code uses https://github.com/ascorbic/tiny-spin to create a spinner icon. It uses process.stderr.cursorTo.

https://nodejs.org/docs/latest-v18.x/api/readline.html#rlcursortox-y

Reading nodejs/node-v0.x-archive#6933 it seems that this is only available in TTY streams though. And according to actions/runner#241 GitHub actions has problems with that (and only workarounds). So I'd also try these.

Please make sure that you run create-gatsby in the right environment and let us know if you need any more guidance. Thanks!

@LekoArts LekoArts closed this as not planned Won't fix, can't repro, duplicate, stale Apr 11, 2023
@0618
Copy link
Author

0618 commented Apr 11, 2023

@LekoArts #35426 (comment) doesn't work as you can see in the original issue. --no-color is for gatsby build, but the issue is from create-gatsby. Also, adding GATSBY_LOGGER=yurnalist before create-gatsby doesn't work either.

The issue is still not resolved. Please do not close it.

@LekoArts
Copy link
Contributor

And according to actions/runner#241 GitHub actions has problems with that (and only workarounds). So I'd also try these.

You should try these then. We're just using Node.js functions that should always be available.

Anyways, you can also just remove create-gatsby and do a git clone of https://github.com/gatsbyjs/gatsby-starter-minimal. Because that's all what npx create-gatsby@latest -y is doing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

2 participants