Skip to content

Cannot read property 'tap' of undefined with Typescript added #576

@leoliu34

Description

@leoliu34

Typescript packages added

typescript@^3.8.3
"@types/jest": "^25.1.4",
"@types/node": "^13.9.8",
"@types/react": "^16.9.29",
"@types/react-dom": "^16.9.5"

Findings

  1. yarn build runs successfully and builds with the typescript packages
  2. After removing the typescript dependencies, the dev server runs fine.

Problem

Running yarn start with the typescript dependencies,
I see the following error with minimal clues on where the problem is,

yarn run v1.22.4
$ yarn relay
$ relay-compiler --src ./src --schema ./schema.graphql
HINT: pass --watch to keep watching for changes.

Writing js
Unchanged: 29 files
$ react-app start
Cannot read property 'tap' of undefined
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

My tsconfig.json is the default generated one and I've been trying to dig into the configs but no luck yet,

{
  "compilerOptions": {
    "target": "es5",
    "lib": [
      "dom",
      "dom.iterable",
      "esnext"
    ],
    "allowJs": true,
    "skipLibCheck": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "preserve"
  },
  "include": [
    "src"
  ]
}

Anyone care to shed some light? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions