What is the solution to getting around this React problem? - node.js

It happens when i run npx create-react-app in the terminal?
if so do you know anyway i can get around this problem.
I need to add more detail.
npx create-react-app my-react-app
npx: installed 1 in 2.024s
The "path" argument must be of type string. Received type undefined
C:\Users\nbatr\AppData\Roaming\npm\node_modules\create-react-app\index.js
Creating a new React app in C:\Users\nbatr\bookmark-app\my-react-app.
Installing packages. This might take a couple of minutes.
(node:7828) ExperimentalWarning: The fs.promises API is experimental
Installing react, react-dom, and react-scripts...
yarn add v1.12.3
(node:3716) ExperimentalWarning: The fs.promises API is experimental
[1/4] Resolving packages...
[2/4] Fetching packages...
error https://registry.yarnpkg.com/#xtuc/long/-/long-4.2.1.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "Unexpected end of
data"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
C:\Users\nbatr\bookmark-app\my-react-app has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting my-react-app/ from C:\Users\nbatr\bookmark-app
Done.

Related

getting error while installing the yarn in react js project

$ yarn install
yarn install v1.19.1
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies cau
sed by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/5] Validating package.json...
error app#0.3.0: The engine "node" is incompatible with this module. Expected version ">=10.17.0". Got "10.15.2"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
getting the errors while installing the yarn in react js project
error app#0.3.0: The engine "node" is incompatible with this module. Expected version ">=10.17.0". Got "10.15.2"
error Found incompatible module.
Remove package-lock.json and run yarn install --ignore-engines
When working on a team, sometimes another dev installs it. One good way to avoid this happening is using package-locks-checks, which I wrote.
If you run npx package-locks-checks it will check for this kind of inconsistencies and avoid you to have issues on production environment.

Found incompatible module node - in which is not supported - create react app

I am running into a problem when I try to install react / babel on my computer. If anyone can help, I would appreciate.
I am running a Ubuntu Ubuntu 20.04 LTS
node -v 14.4.0, so the documentation would be okay.
npm -v is 6.14.5
The problem is, every time I run the command npx create-react-app my-app , I receive this error:
Creating a new React app in /home/leni/Desktop/Tests/bla/my-app.
**warning You are using Node "15.0.0-nightly202006043a7a5d7e62"** which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: "^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0"
(node:102555) [DEP0139] **DeprecationWarning: Calling process.umask() with no arguments is prone to race conditions and is a potential security vulnerability**.
(Use `node --trace-deprecation ...` to show where the warning was created)
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
yarn add v1.22.4
warning You are using Node "15.0.0-nightly202006043a7a5d7e62" which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: "^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0"
(node:102590) [DEP0139] DeprecationWarning: Calling process.umask() with no arguments is prone to race conditions and is a potential security vulnerability.
(Use `node --trace-deprecation ...` to show where the warning was created)
[1/4] Resolving packages...
[2/4] Fetching packages...
**error #babel/core#7.9.0: The engine "node" is incompatible with this module.** **Expected version ">=6.9.0". Got "15.0.0-nightly202006043a7a5d7e62"**
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 /home/leni/Desktop/Tests/bla/my-app has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting my-app/ from /home/leni/Desktop/Tests/bla
Done.
I am sure that I am using node v14.4.0 but every time that I try to create a react project, I encounter failure, any idea in how to solve this? I tried to use Next.js as well, but I had the same problem.
Thank you very much for the help.
Leni
I just encountered the same error. Make sure you don't have a Node app installed through the Ubuntu Software "shop". Deleting it fixed the issue for me.
I am still trying to find the best solution but digging on stackoverflow I found this command and it worked fine.
create-react-app react-app --use-npm

can't generate project with create-react-app

I am using Linux on windows (WSL).
When I try to scaffold a project with create-react-app I get this message:
error An unexpected error occurred: "ENOENT: no such file or directory, lstat '/home/sashacode/.cache/yarn/v4/npm-table-5.2.3-cde0cc6eb06751c009efab27e8c820ca5b67b7f2/node_modules/table/README.md'".
info If you think this is a bug, please open a bug report with the information provided in "/mnt/c/Users/PC2/Apps/react_projects/new_world/yarn-error.log".
info Visit link add for documentation about this command.
Aborting installation.
yarnpkg add --exact react react-dom react-scripts --cwd /mnt/c/Users/PC2/Apps/react_projects/new_world has failed.
Deleting generated file... node_modules
Deleting generated file... package.json
Deleting generated file... yarn.lock
Done.
Don't know what's going on. Any help?
Update node js to a newer version
then run create-react-app again
this should solve your problem

Node.js Failing to Create App After updating

I'm using Window's bash to create a react app ad I get this error. I tried updating eslint and using npx create-react-app xyz, however, I get the below error message.
$ npx create-react-app demo-counter
npx: installed 1 in 14.364s
Path must be a string. Received undefined
C:\Users\Rob\AppData\Roaming\npm\node_modules\create-react-app\index.js
Creating a new React app in C:\Users\Rob\webprojects\september\demo-counter.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
yarn add v1.9.4
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
error eslint#5.6.0: The engine "node" is incompatible with this module. Expected version "^6.14.0 || ^8.10.0 || >=9.10.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 C:\Users\Rob\webprojects\september\demo-counter has failed.
Looks like you might be on an unsupported version of node. What's the output when you type node -v in your terminal?

Getting "The system cannot find the path specified" error while creating new react app

Below is the error message;
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts has failed.
Deleting generated file... node_modules
Deleting generated file... package.json
Deleting firstapp / from D:\Atom Projects\NewProject
Done.
I have checked the path environmental variable path, it seems to be perfect.
Deleting the "Ansicon Entries" in the Registry
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
helped me solving the issue. I followed the solution posted in
https://github.com/cmderdev/cmder/issues/121

Resources