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.

Basic install results in "Failed to compile" #408

@efc

Description

@efc

Is this a bug report?

Not sure, maybe.

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

I am running npm 6.0.1. The comments in this issue template suggest that 5.x does not work with Create React App, but this seems outdated. I have no trouble using Create React App with npm 6.0.1. I just ran yarn create react-app test-app and had no problem. Do I really need to revert to npm 4.x to get these typescript scripts to work?

Which terms did you search for in User Guide?

"Failed to compile"

Environment

  1. npm ls react-scripts-ts (if you haven’t ejected): (empty)
  2. node -v: v8.9.1
  3. npm -v: 6.0.1
  4. yarn --version (if you use Yarn): 1.7.0
  5. npm ls react-scripts-ts (if you haven’t ejected): (empty)
  6. Operating system: macOS 10.13.6
  7. Browser and version (if relevant): Chrome Version 69.0.3497.100 (not relevant)

Steps to Reproduce

  1. yarn create react-app tstest-app --scripts-version=react-scripts-ts
  2. cd tstest-app
  3. yarn start

Expected Behavior

I expect to see the default "Welcome to React" page in my browser.

Actual Behavior

I get this message in my browser instead:

Failed to compile
/Users/efc/LocalSites/rob/tstest-app/node_modules/@types/node/index.d.ts
(198,15): Cannot redeclare block-scoped variable 'console'.

Reproducible Demo

This is a problem with the plain old basic install, so no project involved.

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