React-bootstrap not installing due to husky error - reactjs

I am trying to install react-bootstrap.
Yesterday I managed to successfully install react-bootstrap but I then later uninstalled it. Today I tried to reinstall it in the same project but it gives me the bellow errors.
I then created a new react app as a test in order to try and install react-bootstrap, but it failed with the same errors.
It seems that there is an issue relating to husky, so I installed this package but that did not help either.
I am using macOS.
noahgwynn#Noah frontend % npm i react-bootstrap
npm ERR! code 127
npm ERR! path /Users/noahgwynn/Documents/code/udemy-mern/frontend/node_modules/#popperjs/core
npm ERR! command failed
npm ERR! command sh -c husky install .config/husky
npm ERR! sh: husky: command not found
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/noahgwynn/.npm/_logs/2021-02-20T19_52_28_911Z-debug.log
noahgwynn#Noah frontend % npm install --save react-bootstrap
npm ERR! code 127
npm ERR! path /Users/noahgwynn/Documents/code/udemy-mern/frontend/node_modules/#popperjs/core
npm ERR! command failed
npm ERR! command sh -c husky install .config/husky
npm ERR! sh: husky: command not found
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/noahgwynn/.npm/_logs/2021-02-20T19_55_15_427Z-debug.log
noahgwynn#Noah frontend %
Your help is appreciated.
EDIT: Problem fixed!
Just tried "npm i react-bootstrap" again and this time it worked. It's a couple of hours later, not sure what changed but I'm happy it did.

Related

npm install -g creat-react-app NOT WORKING (ERROR 405)

This happens when i type npm install -g creat-react-app
npm ERR! code E405
npm ERR! 405 Method Not Allowed - GET https://registry.npmjs.org/creat-react-app/creat-react-app
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\admin\AppData\Local\npm-cache_logs\2022-03-01T22_47_51_374Z-debug-0.log
You have a typo
I also suggest using npx instead of npm as well as removing G

Trying to install Expo-cli, But experiencing Error Codes like NPM Install Errors Like EACCES, AND ENOEMPTY

I am new to react native and I am having an issue installing expo-cli, and I get two different errors depending on how I try to install expo-cli. If I do npm install --global expo-cli, it gives the EACCES error.
This is what the problem looks like:
npm install --global expo-cli
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /Users/mac1/.npm-global/lib/node\_modules/expo-cli
npm ERR! dest /Users/mac1/.npm-global/lib/node\_modules/.expo-cli-sUcgOQ3i
npm ERR! errno -13
npm ERR!
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR!
npm ERR! To permanently fix this problem, please run:
npm ERR! sudo chown -R 501:20 "/Users/mac1/.npm"npm ERR! A complete log of this run can be found in:
npm ERR! /Users/mac1/.npm/\_logs/2021-12-28T04\_20\_03\_084Z-debug.log
When I input sudo npm install expo-cli -g --unsafe-perm, it gives an ENOEMPTYerror like this
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /Users/mac1/.npm-global/lib/node_modules/expo-cli
npm ERR! dest /Users/mac1/.npm-global/lib/node_modules/.expo-cli-sUcgOQ3i
npm ERR! errno -66
npm ERR! ENOTEMPTY: directory not empty, rename '/Users/mac1/.npm-global/lib/node_modules/expo-cli' -> '/Users/mac1/.npm-global/lib/node_modules/.expo-cli-sUcgOQ3i'
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/mac1/.npm/_logs/2021-12-29T00_39_39_814Z-debug.log
It is important to add that I have tried to other methods that might solve this problem like, yarn add global expo-cli , sudo chown, npm cache clean --force, . But nothing has worked, I'm not sure if the methods don't work, or if I'm doing the procedure wrong.
Thank You for Your Time!
Option 1: I would recommend you install node js by using the nvm(node version manager). That way you can have different versions of node js installed on your system and you can easily switch versions. Then try using an earlier node version like 14 to install expo-cli
Option 2: Debug - Go through the log file, you are going to see where the error is coming from1

Can't run npm in visual stuido terminal

I am install react & angular on the system. but when I write npm start in visual studio code. it shows an error.
if anyone knows how to fix this problem please tell me. it's very helpful for me. I am trying to fix this error last 4 hours
npm ERR! Missing script: "start"
npm ERR!
npm ERR! Did you mean one of these?
npm ERR! npm stars # View packages marked as favorites
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Pooja Patel\AppData\Local\npm-cache\_logs\2021-09-07T14_31_21_583Z-debug.log
PS C:\Users\Pooja Patel\Desktop\evalue webpage> npm run
Lifecycle scripts included in ionicstore#1.0.0:
test
echo "Error: no test specified" && exit 1
PS C:\Users\Pooja Patel\Desktop\evalue webpage> npm start
npm ERR! Missing script: "start"
npm ERR!
npm ERR! Did you mean one of these?
PS C:\Users\Pooja Patel\Desktop\evalue webpage> npm start
npm ERR! Missing script: "start"
npm ERR!
npm ERR! Did you mean one of these?
npm ERR! npm star # Mark your favorite packages
npm ERR! npm stars # View packages marked as favorites
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Pooja Patel\AppData\Local\npm-cache\_logs\2021-09-07T15_54_08_904Z-debug.log
PS C:\Users\Pooja Patel\Desktop\evalue webpage>
Your package.json file doesnt have scripts, so when you run npm run start, npm cant find the start script in it.
So, open and edit your package.json file and write a script in order to run it.
I had a similar problem. In my case, I had to go to the folder itself in which the project is located. As I understand it, in the C:\Users\Pooja Patel\Desktop\evalue webpage> folder you still have a folder in which the project is located. Just go into it and even then write npm start.

I'm having a hard time running a react command

I just updated my npm and got rid of some useless packages, but for some reason, I still am running into some weirdness when trying to run this command
kalebamarante$ npm init create-react-app kalebcryptoexchange-app
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/create-create-react-app - Not found
npm ERR! 404
npm ERR! 404 'create-create-react-app#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.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/kalebamarante/.npm/_logs/2021-03-09T00_18_58_939Z-debug.log
KALEBS-MacBook-Pro:~ kalebamarante$ npx create-react-app kalebcryptoexchange-app
You are running `create-react-app` 4.0.1, which is behind the latest release (4.0.3).
We no longer support global installation of Create React App.
Please remove any global installs with one of the following commands:
- npm uninstall -g create-react-app
- yarn global remove create-react-app
The latest instructions for creating a new app can be found here:
https://create-react-app.dev/docs/getting-started/
npm ERR! code 1
npm ERR! path /Users/kalebamarante
npm ERR! command failed
npm ERR! command sh -c create-react-app kalebcryptoexchange-app
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/kalebamarante/.npm/_logs/2021-03-09T00_20_01_995Z-debug.log
KALEBS-MacBook-Pro:~ kalebamarante$ sh -c create-react-app kalebcryptoexchange-app
kalebcryptoexchange-app: create-react-app: command not found
you should try npx instead of npm init.
npx create-react-app kalebcryptoexchange-app.
You should use npx instead of npm.
npx create-react-app your-app
Now why is that?
When you are using npm command it will get the node packages for you. i.e. You may have installed the package called 'create-react-app' globally using npm. Now to execute that package you have to use npx command.
Your error log shows this line,
npm ERR! 404 'create-create-react-app#latest' is not in the npm registry.
because you are trying to fetch a package instead of creating it using create-react-app.
In short, npm downloads the packages, npx execute a package.

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