Gatsby: [[email protected]+]: broken Typescript typings

Created on 30 May 2020  路  1Comment  路  Source: gatsbyjs/gatsby

Description

Typescript typings got broken after upgrading gatsby from 2.22.12 to 2.22.13

Probably related PR: https://github.com/gatsbyjs/gatsby/pull/22504 .

Steps to reproduce

build gatsby project with typescript without --skipLibCheck

Expected result

No build errors

Actual result

node_modules/gatsby/index.d.ts:14:27 - error TS2307: Cannot find module './src/bootstrap/load-plugins/types' or its corresponding type declarations.

14 import { PluginRef } from "./src/bootstrap/load-plugins/types"

Environment

  System:
    OS: macOS 10.15.4
    CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
    Shell: 5.8 - /usr/local/bin/zsh
  Binaries:
    Node: 14.3.0 - ~/.nvm/versions/node/v14.3.0/bin/node
    Yarn: 1.22.4 - ~/.nvm/versions/node/v14.3.0/bin/yarn
    npm: 6.14.5 - ~/.nvm/versions/node/v14.3.0/bin/npm
  Languages:
    Python: 3.8.0 - /Users/leo/.pyenv/shims/python
  Browsers:
    Chrome: 83.0.4103.61
    Firefox: 76.0
    Safari: 13.1
  npmPackages:
    gatsby: 2.22.13 => 2.22.13 
    gatsby-plugin-layout: 1.3.2 => 1.3.2 
    gatsby-plugin-lodash: 3.3.2 => 3.3.2 
    gatsby-plugin-material-ui: 2.1.9 => 2.1.9 
    gatsby-plugin-nprogress: 2.3.2 => 2.3.2 
    gatsby-plugin-postcss: 2.3.2 => 2.3.2 
    gatsby-plugin-react-redux: 1.1.0-0 => 1.1.0-0 
    gatsby-plugin-robots-txt: 1.5.1 => 1.5.1 
    gatsby-plugin-typescript: 2.4.3 => 2.4.3 
    gatsby-plugin-typography: 2.5.2 => 2.5.2 
    gatsby-source-filesystem: 2.3.8 => 2.3.8 
    gatsby-transformer-json: 2.4.3 => 2.4.3 

tsconfig.json

{
  "compilerOptions": {
    "baseUrl": ".",
    "lib": ["esnext", "dom"],
    "target": "esnext",
    "module": "esnext",
    "moduleResolution": "node",
    "noEmit": true,
    "strict": true,
    "allowSyntheticDefaultImports": true,
    "isolatedModules": true,
    "allowJs": true,
    "esModuleInterop": true,
    "disableSizeLimit": true,
    "jsx": "preserve"
  },
  "include": ["."],
  "exclude": ["node_modules", "public", ".cache", "data", "static"]
}
needs core review TypeScript migration bug

Most helpful comment

I have the same problem with IPluginInfoOptions in gatsby ^2.24.82.

>All comments

I have the same problem with IPluginInfoOptions in gatsby ^2.24.82.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ferMartz picture ferMartz  路  3Comments

KyleAMathews picture KyleAMathews  路  3Comments

dustinhorton picture dustinhorton  路  3Comments

timbrandin picture timbrandin  路  3Comments

rossPatton picture rossPatton  路  3Comments