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

gatsby-link 5.14.0 types broken #39158

Open
2 tasks done
abemedia opened this issue Nov 10, 2024 · 3 comments · May be fixed by #39169
Open
2 tasks done

gatsby-link 5.14.0 types broken #39158

abemedia opened this issue Nov 10, 2024 · 3 comments · May be fixed by #39169
Labels
status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer type: bug An issue or pull request relating to a bug in Gatsby

Comments

@abemedia
Copy link

abemedia commented Nov 10, 2024

Preliminary Checks

Description

Updating gatsby-link to 5.14.0 causes types to be broken. It appear's to be caused by #38590

See the kind of Typescript errors I'm receiving now:

src/pages/signup/billing.tsx:102:14 - error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.

102     navigate('/signup/')
                 ~~~~~~~~~~

See the file src/pages/redirect.tsx in the reproduction link.

Reproduction Link

https://codesandbox.io/p/devbox/serverless-hooks-xf3rhw?workspaceId=e7359dad-f2e3-4fc9-9dc7-a71e1e25e213

Steps to Reproduce

  1. Call navigate using a string

Expected Result

Type checks pass

Actual Result

Type checks fail with following error

Argument of type 'string' is not assignable to parameter of type 'number'.

Environment

System:
    OS: macOS 15.0.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.11.0 - /var/folders/xh/ttknrcjs3tbfv99f83f454d40000gn/T/yarn--1731201934806-0.747145292822317/node
    Yarn: 1.22.21 - /var/folders/xh/ttknrcjs3tbfv99f83f454d40000gn/T/yarn--1731201934806-0.747145292822317/yarn
    npm: 10.9.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 130.0.6723.117
    Safari: 18.0.1
  npmPackages:
    gatsby: ^5.14.0 => 5.14.0
    gatsby-plugin-babel-plugin-typescript-to-proptypes: ^1.0.5 => 1.0.5
    gatsby-plugin-catch-links: ^5.14.0 => 5.14.0
    gatsby-plugin-google-gtag: ^5.14.0 => 5.14.0
    gatsby-plugin-image: ^3.14.0 => 3.14.0
    gatsby-plugin-manifest: ^5.14.0 => 5.14.0
    gatsby-plugin-offline: ^6.14.0 => 6.14.0
    gatsby-plugin-perf-budgets: ^0.0.18 => 0.0.18
    gatsby-plugin-robots-txt: ^1.8.0 => 1.8.0
    gatsby-plugin-sass: ^6.14.0 => 6.14.0
    gatsby-plugin-sharp: ^5.14.0 => 5.14.0
    gatsby-plugin-sitemap: ^6.14.0 => 6.14.0
    gatsby-plugin-webpack-bundle-analyser-v2: ^1.1.32 => 1.1.32
    gatsby-remark-autolink-headers: ^6.14.0 => 6.14.0
    gatsby-remark-external-links: ^0.0.4 => 0.0.4
    gatsby-remark-images: ^7.14.0 => 7.14.0
    gatsby-remark-smartypants: ^6.14.0 => 6.14.0
    gatsby-remark-table-of-contents: ^2.0.0 => 2.0.0
    gatsby-remark-vscode: ^3.3.1 => 3.3.1
    gatsby-source-filesystem: ^5.14.0 => 5.14.0
    gatsby-transformer-inline-svg: ^1.2.0 => 1.2.0
    gatsby-transformer-remark: ^6.14.0 => 6.14.0
    gatsby-transformer-sharp: ^5.14.0 => 5.14.0
    gatsby-transformer-yaml: ^5.14.0 => 5.14.0

Config Flags

No response

@abemedia abemedia added the type: bug An issue or pull request relating to a bug in Gatsby label Nov 10, 2024
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Nov 10, 2024
@Dihgg
Copy link

Dihgg commented Nov 19, 2024

Hi, adding a comment here to say I'm facing the EXACT same issue.

@jasonqsong
Copy link

same issue here

@SebastianKoch27
Copy link

We have the same issue here as well

@pajosieg pajosieg linked a pull request Nov 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants