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

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

Related

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

React-bootstrap not installing due to husky error

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.

Installing create-react-app gives npm ERR! shasum check failed and npm ERR! Unexpected end of JSON input while parsing near '...mojOzGIEI2rg0m24Yb5Oq'

Errors when i use sudo npm install create-react-app -g
npm ERR! Linux 4.13.0-39-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "i" "create-react-app" "-g"
npm ERR! node v6.11.4
npm ERR! npm v3.5.2
npm ERR! shasum check failed for /tmp/npm-16477-77596b49/registry.npmjs.org/tar/-/tar-2.2.1.tgz
npm ERR! Expected: 8e4d2a256c0e2185c6b18ad694aec968b83cb1d1
npm ERR! Actual: 5eb06eb521673d0940a4deb11baf89d62647f193
npm ERR! From: https://registry.npmjs.org/tar/-/tar-2.2.1.tgz
when use npm install create-react-app
- npm-version : 6.0.0
- node-version: 8.11.1
error is:
npm ERR! Unexpected end of JSON input while parsing near '...mojOzGIEI2rg0m24Yb5Oq'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/dilipcoder/.npm/_logs/2018-05-05T11_34_14_721Z-debug.log
i have already tried these options
npm cache clean --force
reinstalling npm and node
switching different version of npm
error which I get while installing create-react-app other packages installed properly
the error npm ERR! shasum check failed and npm ERR! Unexpected end of JSON input while parsing near'....' , will be solved by switching npm reigistry from the list of given npm registry.
List of Npm registry:
https://registry.npmjs.org/ (Dfault One)
http://r.cnpmjs.org/
https://registry.npm.taobao.org/
https://registry.nodejitsu.com/
http://registry.mirror.cqupt.edu.cn
https://skimdb.npmjs.com/registry
https://npm.open-registry.dev/ (https://open-registry.dev)
To switch just type
npm config set registry "https://registry.npmjs.com/"
Replace the registry url with the above urls check which one works for you.
After That:
npm cache clear --force
npm cache verify
now error will be solved.
"npm cache clean --force" didn't work for me but removing package-lock.json worked.
https://github.com/vuejs-templates/webpack/issues/990#issuecomment-395750082
Error:
SyntaxError: Unexpected end of JSON input while parsing near
Removing package-lock.json worked for me.
Add Powershell script or Linux script as below,
Powershell:
Remove-Item package-lock.json -Force
Linux:
rm -rf package-lock.json
Path In Azure Devops:
$(System.DefaultWorkingDirectory)\appName\appName\ClientApp\node_modules'
Note - appName is an example you can add a path as per your source code.

can't run `npm install -g angular/cli`

I've recently generated a new ssh key on my mac and I can't seem to install angular/cli anymore. When I try to run npm install -g angular/cli I get this error:
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git#github.com/angular/cli.git
npm ERR!
npm ERR! ERROR: Repository not found.
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128
At the same time typescript installed perfectly fine. My npm version is 5.3.0 and node version is 8.2.1.
Thanks in advance!
I was using the incorrect repo name. It should have been:
npm install -g #angular/cli
Notice the #.

Getting an error trying to install ibm_db via npm

I am using windows os. I have no admin rights in the system I am working.
I was following this link https://www.ibm.com/developerworks/community/blogs/pd?lang=en.
But got this error
npm ERR! ibm_db#0.0.18 install: node installer/driverInstall.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ibm_db#0.0.18 install script 'node installer/driverInstall.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the ibm_db package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node installer/driverInstall.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs ibm_db npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls ibm_db npm ERR! There is likely additional logging output above.
I have successfully installed it. Have used nodejs V0.12.7 and npm 3.8.5 and installed it without giving -g i.e. locally now its working fine for me.

Resources