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.

Missing tsconfig.test.json when upgrading to v2.5.0 #141

Closed
@JReinhold

Description

@JReinhold

NB: MAYBE ONLY A ONE TIME THING. SEE 'REPRODUCIBLE DEMO' SECTION!

Bug report

When ugrading react-scripts-ts from version 2.4.0 to 2.5.0+ the app wont start, because the file tsconfig.test.json is missing from the project. This is probably related to #115 that adds support for this file. However when upgrading react-scripts-ts by bumping the version number in package.json and running yarn install this file of course doesn't get created, and thus is missing.

Environment

  1. npm ls react-scripts-ts: 2.6.0
  2. node -v: 8.3.0
  3. npm -v: 5.3.0
  4. yarn --version: 0.27.5

Then, specify:

  1. Operating system: macOS Sierra 10.12.5

Steps to Reproduce

  1. Have version 2.4.0 or below of react-scripts-ts installed and working in a project
  2. Change react-scripts-ts to version 2.5.0 or above in package.json
  3. run yarn installor npm install
  4. try to start app with yarn start

Expected Behavior

It should work

Actual Behavior

It crashes with an error saying that tsconfig.test.jsonis missing.

Reproducible Demo

Honestly I can't reproduce this. I fixed the problem, and when I tried to delete the file to reproduce the problem, the error wouldn't happen, and everything worked. yet I'm still reporting this, to see if others are having similar issues, or can reproduce it.

How To Fix This

For reference to others, this is how I fixed this issue:

  1. Create a new file in the project root (next to the tsconfig.json file) called tsconfig.test.json
  2. Copy and paste the content of this file into the new file: https://github.com/nicolaserny/create-react-app-typescript/blob/master/packages/react-scripts/template/tsconfig.test.json
  3. start the app, should work now.

If this indeed is a bug that many are experiencing I would suggest one of these steps:

a. Write a migration guide in the README.md that explains how to fix this error when upgrading.
b. Output a useful error message, explaining how to fix the issue, possibly with a link to this issue.
c. Automatically create the file if it doesn't exist when the app is started. (not sure this is even possible)

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