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

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

Closed
KalpanaPagariya opened this issue Feb 21, 2018 · 3 comments
Closed

Comments

@KalpanaPagariya
Copy link

KalpanaPagariya commented Feb 21, 2018

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.)

@Timer
Copy link
Contributor

Timer commented Mar 5, 2018

I'm not sure how we can help here, it looks like you need to configure npm to authenticate to your on-prem registry. You can file an issue with npm for help with this.

@Timer Timer closed this as completed Mar 5, 2018
@KalpanaPagariya
Copy link
Author

thanks I will check with npm team

@hieu-nv
Copy link

hieu-nv commented Oct 4, 2018

Please try to use https://www.npmjs.com/package/@hieunv/react-scripts

npx create-react-app my-app --scripts-version=@hieunv/react-scripts

@lock lock bot locked and limited conversation to collaborators Jan 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants