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

Fresh install fails to compile #12

Closed
AdamScura opened this issue Mar 26, 2020 · 2 comments
Closed

Fresh install fails to compile #12

AdamScura opened this issue Mar 26, 2020 · 2 comments

Comments

@AdamScura
Copy link

npm start fails to compile

Repro:

  1. clone repo
  2. open folder in vscode
  3. npm install
  4. npm start
  5. observe failure message

image

Terminal output from npm start

> rsk-github-issues-example@0.1.0 start D:\Dev\rtk-github-issues-example
> react-scripts start

�[34mi�[39m �[90m「wds」�[39m: Project is running at http://0.0.0.0:3000/
�[34mi�[39m �[90m「wds」�[39m: webpack output is served from 
�[34mi�[39m �[90m「wds」�[39m: Content not from webpack is served from D:\Dev\rtk-github-issues-example\public
�[34mi�[39m �[90m「wds」�[39m: 404s will fallback to /
Starting the development server...

Failed to compile.

D:/Dev/rtk-github-issues-example/node_modules/jest-diff/build/diffLines.d.ts
TypeScript error in D:/Dev/rtk-github-issues-example/node_modules/jest-diff/build/diffLines.d.ts(8,13):
'=' expected.  TS1005

     6 |  */
     7 | import { Diff } from './cleanupSemantic';
  >  8 | import type { DiffOptions } from './types';
       |             ^
     9 | export declare const diffLinesUnified: (aLines: string[], bLines: string[], options?: DiffOptions | undefined) => string;
    10 | export declare const diffLinesUnified2: (aLinesDisplay: string[], bLinesDisplay: string[], aLinesCompare: string[], bLinesCompare: string[], options?: DiffOptions | undefined) => string;
    11 | export declare const diffLinesRaw: (aLines: string[], bLines: string[]) => Diff[];

I did some quick research and it seems to be related to this issue: https://stackoverflow.com/questions/59833120/parsing-error-expected-in-import-type

I'm guessing the latest version of jest is using a feature that is not fully supported by the typescript compiler. This commit was released 12 hours ago: jestjs/jest@4a59daa#diff-8b6cd0ec8c11f6c2366c3527788d8fe8

@afzalhussain23
Copy link

Upgrade @types/jest version to 25.2.1 to solve this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants