I am getting various warrnings and errors when trying to create react app with npx
I am trying to create react app with npx and get the following error:
error email@example.com: The engine "yarn" is incompatible with this module. Expected version ">=1.0.0".
Any ideas what could be the source of the issue? any tips would be appreciated. Thanks!
npx create-react-app food
npx: installed 91 in 5.566s Creating a new React app in /home/oren/m/code/food. Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts... yarn add v0.16.1 [1/4] Resolving packages... [2/4] Fetching packages... warning firstname.lastname@example.org: The platform "linux" is incompatible with this module. info "email@example.com" is an optional dependency and failed compatibility check. Excluding it from installation. warning firstname.lastname@example.org: The platform "linux" is incompatible with this module. info "email@example.com" is an optional dependency and failed compatibility check. Excluding it from installation. error firstname.lastname@example.org: 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 --cwd /home/oren/m/code/food has failed. Deleting generated file... package.json Deleting generated file... yarn.lock Deleting food/ from /home/oren/m/code Done.
About my environment:
$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.6 LTS Release: 16.04 Codename: xenial
$ uname -a Linux oren 4.4.0-142-generic #168-Ubuntu SMP Wed Jan 16 21:00:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Look at this line in the log
error email@example.com: The engine "yarn" is incompatible with this module. Expected version ">=1.0.0". It says your yarn version is not compatible. You have yarn v0.16.1 but it has to be above 1.0.0. Please try to update your yarn version.
This looks like a npx issue, since npm install -g worked, can you run create-react-app directory, ie create-react-app foo insteead of prefixing with npx. Alternatively does it work if you do a deep copy that react app in a new directory? All you need is package.json and in fact the react-scripts dependency.
I have solved by installing latest version of Yarn.
- first uninstall version
- installed latest version
npm install -g yarn
- removing yarn cache folder in the AppData folder has solved my issue C:\Users\test\AppData\Local\Yarn
create-react-app: Not Found. Steps to reproduce. I am trying to run create-react-app and it keeps deleting the folder that's created because of an error; Expected behavior. I thought it would create a new React application for me. Actual behavior Creating a new React app in C:\Users\jack\WebstormProject\test. Installing packages.
If anyone else is struggling with this even after uninstalling/reinstalling yarn from npm, for me I actually had an old version of yarn installed outside of npm or another package manager, and I had to uninstall it from the Add or Remove Programs list in Windows.
After installing npx-create-react-app filename I am not able to get the source(src) files. Please let me know what to do next needs triage #9157 opened Jun 15, 2020 by skwebdeveloper
i wanted to share to u what i had a problem install create-react-app just recently. after installing the react app from npx react app, it will give problems when u run the npm server that's
Normally, Create React App ignores the hostname. You may use this variable to force assets to be referenced verbatim to the url you provide (hostname included). This may be particularly useful when using a CDN to host your application. CI Used Used: When set to true, Create React App treats warnings as failures in the build. It also makes the
yarn create is available in Yarn 0.25+ #Selecting a template. You can now optionally start a new app from a template by appending --template [template-name] to the creation command. If you don't select a template, we'll create your project with our base template.
- Have you installed yarn? Check the version of yarn and update it to latest version.