-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Can't Scaffold TypeScript Project Anymore... #12443
Comments
The command works properly. It appears it could be a node version problem based on the npx installation? I used node v14. Could you give more details on the versions you are using? Also, the name of the project is really not nice. Add more specifics and be nicer please :) ➜ npx create-react-app cra-project --template typescript
npx: installato 67 in 7.591s
Creating a new React app in /OpenSource/cra-project.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template-typescript...
> core-js@3.22.7 postinstall /OpenSource/cra-project/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
> core-js-pure@3.22.7 postinstall /OpenSource/cra-project/node_modules/core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"
+ cra-template-typescript@1.2.0
+ react-scripts@5.0.1
+ react-dom@18.1.0
+ react@18.1.0
added 1394 packages from 625 contributors in 100.1s
185 packages are looking for funding
run `npm fund` for details
Initialized a git repository.
Installing template dependencies using npm...
npm WARN @apideck/better-ajv-errors@0.3.4 requires a peer of ajv@>=8 but none is installed. You must install peer dependencies yourself.
+ web-vitals@2.1.4
+ @testing-library/jest-dom@5.16.4
+ @types/node@16.11.36
+ @testing-library/user-event@13.5.0
+ @types/react-dom@18.0.5
+ @types/jest@27.5.1
+ @testing-library/react@13.3.0
+ @types/react@18.0.9
+ typescript@4.7.2
added 40 packages from 110 contributors and updated 1 package in 12.412s
185 packages are looking for funding
run `npm fund` for details
We detected TypeScript in your project (src/App.test.tsx) and created a tsconfig.json file for you.
Your tsconfig.json has been populated with default values.
Removing template package using npm...
npm WARN @apideck/better-ajv-errors@0.3.4 requires a peer of ajv@>=8 but none is installed. You must install peer dependencies yourself.
removed 1 package and audited 1436 packages in 5.364s
185 packages are looking for funding
run `npm fund` for details
found 1 high severity vulnerability
run `npm audit fix` to fix them, or `npm audit` for details
Created git commit.
Success! Created cra-project at /OpenSource/cra-project
Inside that directory, you can run several commands:
npm start
Starts the development server.
npm run build
Bundles the app into static files for production.
npm test
Starts the test runner.
npm run eject
Removes this tool and copies build dependencies, configuration files
and scripts into the app directory. If you do this, you can’t go back!
We suggest that you begin by typing:
cd cra-project
npm start
Happy hacking!
➜ node -v
v14.18.3 |
try this |
UPDATE: Running Hmm, "npx create-react-app foo --template typescript" is creating a folder with package.json, package-lock.json and node_modules and that's it. I've done package.json is package.json only has a few properties:
If I install create-react-app globally with |
i had a similar problem when running thru $ npx create-react-app ./client --template typecript
npx: installed 67 in 19.558s
Creating a new React app in [DIR].
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template-typecript...
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/cra-template-typecript - Not found
npm ERR! 404
npm ERR! 404 'cra-template-typecript@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
Aborting installation.
npm install --no-audit --save --save-exact --loglevel error react react-dom react-scripts cra-template-typecript has failed. and indeed, first installing globally very strange behavior... |
When I run the command:
it ends with this strange message and creates a js project that doesn't seem to build...
The text was updated successfully, but these errors were encountered: