npm ERR! Failed at the node-sass#4.14.1 postinstall script - reactjs

I'm trying to install the npm package. However when i try to install it i get this error: npm ERR! Failed at the node-sass#4.14.1 postinstall script.
my node-sass verison is: 4.14.1
my node version is 12.14.0
I have removed package-lock.json and node_modules and cleared npm cache, and then installed the packages again but that didn't help.
Any idea what the issue is?

Related

How can I install React using NPM?

I can't install react using npm for some reason, I can't figure out what the problem is. Does anyone know a solution to this problem? I uninstalled npm and tried again but it didn't help and tried other things. but it doesn't help me.
stalling react, react-dom, and react-scripts with cra-template...
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path D:\darslar\imtihon-app\node_modules\tailwindcss\oxide-node-api-shim/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'D:\darslar\imtihon-app\node_modules\tailwindcss\oxide-node-api-shim\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Local\npm-cache\_logs\2023-02-08T15_57_28_764Z-debug-0.log
Aborting installation.
npm install --no-audit --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.
Deleting generated file... package.json
node:fs:1226
return handleErrorFromBinding(ctx);
^
Error: EBUSY: resource busy or locked, rmdir '\\?\D:\darslar\imtihon-app'
at rmdirSync (node:fs:1226:10)
at _rmdirSync (node:internal/fs/rimraf:235:5)
at rimrafSync (node:internal/fs/rimraf:193:7)
at Object.rmSync (node:fs:1275:10)
at Object.removeSync (C:\Users\User\AppData\Local\npm-cache\_npx\c67e74de0542c87c\node_modules\fs-extra\lib\remove\index.js:15:28)
at C:\Users\User\AppData\Local\npm-cache\_npx\c67e74de0542c87c\node_modules\create-react-app\createReactApp.js:539:14
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
errno: -4082,
syscall: 'rmdir',
code: 'EBUSY',
}
Node.js v18.12.0
Try these steps:
Delete package-lock.json and run NPM again.
Ensure no other processes of node.js are running (check task manager)
If you are using visual studio code, close it and try running npm install again.
You can also check the following issue page: https://github.com/npm/npm/issues/17444
https://github.com/tailwindlabs/tailwindcss/issues/10534#issuecomment-1422896616
Basically you need update npm to latest version
npm install -g npm#latest
Delete package-lock.json and node_modules and launch
npm i
It was a problem with dependency of cra. Whole world couldn`t install react for one hour.

How can npm install always throwing error code 1?

Every time I use npm install it always shows this error. I have already downgraded my Node.js to the latest stable version.
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command C:\Program Files\nodejs\node.exe C:\Users\AZ PRODUCTIONS\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\AZ PRODUCTIONS\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! > spookyswap-sdk#1.2.0 prepare
npm ERR! > rm -rf ./dist && yarn build
I can't post more because of the limitation.
npm clear cache --force
and delete node_modules and package-lock.json
try
npm i --force

getting error while trying to create a react app

I used to create react apps with the facebook's github repo and it worked each time, but this time it is not working. Because I'm getting this error and I can't find the reason behind it. I've already tried to do the cache clean.
> core-js#2.6.12 postinstall C:\Users\user\Desktop\cryptohello\node_modules\babel-runtime\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"
The system cannot find the path specified.
npm ERR! code ELIFECYCLE
npm ERR! errno 3
npm ERR! core-js#2.6.12 postinstall: `node -e "try{require('./postinstall')}catch(e){}"`
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the core-js#2.6.12 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Roaming\npm-cache\_logs\2021-08-15T16_48_09_293Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.
Deleting generated file... node_modules
Deleting generated file... package.json
Deleting cryptohello/ from C:\Users\user\Desktop
Done.
The problem is you haven't support of fork, exec and bash in cmd in windows, please try with GIT Bash

could not create react project

I was trying to create a react project using the command
npx create-react-app chat-app
But I am getting this error.
Creating a new React app in /home/mikhil/react-tutorial/internshala-react-course/chat-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! npm ERR! Found: #babel/core#undefined
npm ERR! node_modules/#babel/core npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #babel/core#"^7.0.0-0" from #babel/preset-env#7.13.10
npm ERR! node_modules/#babel/preset-env
npm ERR! #babel/preset-env#"^7.12.1" from #svgr/webpack#5.5.0
npm ERR! node_modules/#svgr/webpack
npm ERR! #svgr/webpack#"5.5.0" from react-scripts#4.0.3
npm ERR! node_modules/react-scripts
npm ERR! react-scripts#"*" from the root project
npm ERR! npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/mikhil/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/mikhil/.npm/_logs/2021-03-18T11_58_50_255Z-debug.log
Aborting installation. npm install --save --save-exact --loglevel
error react react-dom react-scripts cra-template has failed.
Deleting generated file... package.json
Deleting chat-app/ from /home/mikhil/react-tutorial/internshala-react-course
Done.
You can try to update npm with npm update and see if that fixes it, and if not you can try these steps.
If you've previously installed create-react-app globally via npm install -g create-react-app, it is recommend you uninstall the package using npm uninstall -g create-react-app or yarn global remove create-react-app to ensure that npx always uses the latest version.
You will also want to delete your remnant files and folders for chat-app
Once you are in the /home/mikhil/react-tutorial/internshala-react-course directory and you have removed the global installations you can try running these commands.
npx create-react-app my-app
cd my-app
npm start
Create React App - Getting Started
I was having the same issue with NPM version 7.20.0.
Simply install an older version of NPM.
In the terminal run: npm install npm#6.14.11 -g
There appears to be some particular versions of NPM that cause this issue. Try updating to the very latest version of NPM.
I was also trying to do the same the whole day, then at last I have to open the documentation, there it was mentioned that you can also create react app using
npm init create-react-app **app_name**
and it worked for me fine.
I was troubled very much by this dependency thing.

How to install Blur Admin?

I have been trying to install blur-admin via (git clone https://github.com/akveo/blur-admin.git). But when I install it from git bash as mentioned in the installation guide it shows the following error:
bower ECONFLICT Unable to
find suitable version for angular
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program
Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v4.4.5
npm ERR! npm v2.15.5
npm ERR! code ELIFECYCLE
npm ERR! blur_admin#1.2.0 postinstall: bower install npm ERR! Exit
status 1 npm ERR! npm ERR! Failed at the blur_admin#1.2.0 postinstall
script 'bower install'.
npm ERR! This is most likely a problem with the blur_admin package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! bower install
npm ERR! You can get information on how to open an issue for this
project with:
npm ERR! npm bugs blur_admin
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm ERR! npm owner ls blur_admin
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\xampp\htdocs\blur-admin\npm-debug.log
The issue is because Bower is not installed in your Windows Machine.
Try to install bower before installing this AngularJs template.
Use the following command to install bower:
npm install -g bower
Also check if Gulp - Task automation tool is install or not.
Use the following command to install the same:
npm install -g gulp
Now use npm install to install the project and its Package Dependencies.
To run the application:
gulp serve
Sorry I got a little bit late.
Did you try to move the /bower_components/ folder from the /client/ directory to your root project directory? That worked for me.
First
npm i -g npm
Then delete everything in node_modules. When those are deleted, cd to your directory and
npm install
Worked for me. If you are on OSX or Linux, use sudo.
If you are on Windows, make sure you're running as administrator.
The issue is from Bower, as Bower is not installed into the system.
First install the bower by following:
npm install -g bower
Then run the app by :
gulp serve

Resources