npx create-react-app not working properly and continuously failing
OS: Windows 10
Yarn version: 1.21.0
Node version: 13.3.0
Npm version: 6.13.1
Attached the logs file.
Here below is cmd prompt logs:
C:\Userssatis\Documents\reacttest>npx create-react-app awesome-project
Creating a new React app in C:\Userssatis\Documents\reacttest\awesome-project.
warning ....\package.json: No license field
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
yarn add v1.21.0
warning ....\package.json: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "react-scripts > @typescript-eslint/eslint-plugin > [email protected]" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] Building fresh packages...
[1/3] â ‚ core-js-pure
[2/3] â ‚ core-js
error An unexpected error occurred: "C:\Userssatis\Documents\reacttest\awesome-project\node_modules\core-js: EINVAL: invalid argument, mkdir 'C:\Userssatis\AppData\Local\Temp;C:\Program Files (x86)\Minimal ADB and Fastboot;\yarn--1576052903837-0.6643317013326462'".
info If you think this is a bug, please open a bug report with the information provided in "C:\Userssatis\Documents\
Aborting installation.
yarnpkg add --exact react react-dom react-scripts cra-template --cwd C:\Userssatis\Documents\reacttest\awesome-project has failed.
yarn-error.log
The issue was with running the command yarnpkg add --exact react react-dom react-scripts cra-template --cwd C:\Users\satis\Documents\reacttest\awesome-project, which is out of our control, so I don't think I can help much.
Try running with the --use-npm flag and see if it still happens? npx create-react-app awesome-project --use-npm.
I'm seeing the same thing a similar failure on my development system while creating a new app, specifying the --use-npm flag did allow me to create an app.
My OS is Windows 10, here's the console output:
PS D:\src\Experimental> npx create-react-app my-react-app
npx: installed 91 in 8.731s
Creating a new React app in D:\src\Experimental\my-react-app.
(node:13656) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
yarn add v0.27.5
(node:2268) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
warning [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
error [email protected]: The engine "yarn" is incompatible with this module. Expected version ">=1.0.0".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Aborting installation.
yarnpkg add --exact react react-dom react-scripts cra-template --cwd D:\src\Experimental\my-react-app has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting my-react-app/ from D:\src\Experimental
Done.
@jrsconfitto Seems like you just need to upgrade yarn? 0.27 is a couple of years old.
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.