Skip to content

create-react-app is failed to create project with typescript option #4052

Closed
@KalpanaPagariya

Description

@KalpanaPagariya

Is this a bug report?

Yes. I am facing below issue while creating new react app with typescipt:
D:\app>create-react-app my-app --scripts-version=react-scripts-ts

Creating a new React app in D:\learning\reactjs\my-app.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts-ts...

npm ERR! code E407
npm ERR! 407 Proxy Authentication Required: react-scripts-ts@latest

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\kalpanap\AppData\Roaming\npm-cache_logs\2018-02-21T02_33_17_410Z-debug.log

Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts-ts has failed.

Deleting generated file... package.json
Deleting my-app / from D:\learning\reactjs
Done.

Below is the npm config change:
I am working in my office having some firewall setup.
Below is the setup I did for proxy in npm config. I changed proxy and https-proxy to my office n/w proxy because npm install was failing

D:\myapp>npm config list
; cli configs
metrics-registry = "http://registry.npmjs.org/"
scope = ""
user-agent = "npm/5.6.0 node/v8.9.4 win32 x64"

; userconfig C:\Users\kalpanap.npmrc
https-proxy = "http://xxxxxx:8080/"
proxy = "http://xxxxxx:8080/"

registry = "http://registry.npmjs.org/"
strict-ssl = false

; builtin config undefined
prefix = "C:\Users\kalpanap\AppData\Roaming\npm"

Did you try recovering your dependencies?

Its new project.

Which terms did you search for in User Guide?

(Write your answer here if relevant.)

Environment

  1. node -v: v8.9.4
  2. npm -v: 5.6.0
  3. yarn --version (if you use Yarn):
  4. npm ls react-scripts (if you haven’t ejected): no

Then, specify:

  1. Operating system: Win 7
  2. Browser and version (if relevant):

Steps to Reproduce

(Write your steps here:)

Expected Behavior

app should have been created with tsx files.

Actual Behavior

But the creation of project fails saying 'Proxy authentication required' . Now i am not sure how can I set this proxy while creating react-app

(Write what happened. Please add screenshots!)

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

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