Skip to content
This repository was archived by the owner on Jan 26, 2019. It is now read-only.
This repository was archived by the owner on Jan 26, 2019. It is now read-only.

Test fails during set-up with TypeScript 2.6.X #198

Open
@karak

Description

@karak

Is this a bug report?

Yes

Can you also reproduce the problem with npm 4.x?

No for npm 4.6.1 nor 5.5.1, but yes for all after installing by yarn.

Which terms did you search for in User Guide?

'jest' and 'ts-jest'

Environment

  1. node -v: v8.9.0
  2. npm -v:5.5.1
  3. yarn --version (if you use Yarn): 1.2.1
  4. npm ls react-scripts-ts (if you haven’t ejected):
    ts-error@0.1.0 /Users/XXXX/XXXXX
    └── UNMET DEPENDENCY react-scripts-ts@2.8.0
    npm ERR! missing: react-scripts-ts@2.8.0, required by ts-error@0.1.0

macOS High Sierra

Steps to Reproduce

  1. Created project with create-react-app --scripts-version=react-scripts-ts
  2. Upgrade typescript with yarn add typescript@^2.6.0
  3. Run tests yarn test and press [A] to fail in module resolution.
 FAIL  src/App.test.tsx
  ● Test suite failed to run

    Cannot find module 'ts-jest' from 'App.test.tsx'

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:179:17)
      at Object.<anonymous> (src/App.test.tsx:1:103)

It never happens in case of yarn add typescript@2.5.3, same as dependent one of react-scripts-ts.

Expected Behavior

Execute test codes successfully.

Actual Behavior

Fails before actual tests.

Reproducible Demo

https://github.com/karak/ts-jest-error.git

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions