Can't install Angular 1.5 component router - angularjs

I'm trying to install the Angular 1.5 component router for use in a new project, but having a lot of difficulty. As per https://docs.angularjs.org/guide/component-router, the following should work:
npm install #angular/router --save
Here's what I see:
$ npm install #angular/router --save
npm ERR! Darwin 14.5.0
npm ERR! argv "/Users/JonathanM/.nvm/versions/node/v4.4.2/bin/node" "/Users/JonathanM/.nvm/versions/node/v4.4.2/bin/npm" "install" "#angular/router" "--save"
npm ERR! node v4.4.2
npm ERR! npm v3.8.6
npm ERR! code E400
npm ERR! 400 Bad Request
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /Users/JonathanM/Workspace/my-angular-app/npm-debug.log
With node v4.4.2 and npm v3.8.6.
I feel like I'm on the wrong version of npm or something, because I also can't install angular with the syntax they mention in the docs (npm install#1.5.x angular --save). When I try, I get a generic Usage: npm <command> error, like it doesn't even recognize the command.
Am I doing something wrong? Did the package(s) get pulled/moved? Any help would be appreciated.

As #PeteBD suspected in his comment, I was pointing to a private npm repo. I was able to successfully install the router with:
npm config set registry https://registry.npmjs.org/
npm install #angular/router --save

Related

How to solve the dependency error of tawk to chat npm package with react 18.1.0?

I am trying to install tawk to chat npm package from https://github.com/tawk/tawk-messenger-react. But I get the following error as attached below. I fear if I choose to install it forcefully, it will mess up my code-base. How can I solve it?
error log URL- https://termbin.com/4q35
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: laptop-warehouse#0.1.0
npm ERR! Found: react-dom#18.1.0
npm ERR! node_modules/react-dom
npm ERR! react-dom#"^18.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-dom#"^17.0.2" from #tawk.to/tawk-messenger-react#1.0.0
npm ERR! node_modules/#tawk.to/tawk-messenger-react
npm ERR! #tawk.to/tawk-messenger-react#"*" 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/somaya/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/somaya/.npm/_logs/2022-05-07T19_08_49_501Z-debug-0.log
Looks like #tawk.to/tawk-messenger-react# package isn't compatible with react-dom 18. Try using react-dom#"^17.0.2"
try running npm install <dependencyName> --force or npm install <dependencyName> --legacy-peer-deps
if that doesnt work remove node modules and install packages again
if that also doesnt work then you will have to downgrade your react and react-dom versions
If you're using react 18.1.0 you should use #tawk.to/tawk-messenger-react#2.0.1
Base on the error you provide you are using #tawk.to/tawk-messenger-react#1.0.0 which supports react 17 and conflict on version you are using.
Our messenger version 1.*.* is supporting react 17
and version 2.*.* for supporting react 18

Problem to install react-reveal animation on terminal visual studio code

Hello everybody i have a probem to install the react-reveal animation dependencie , each time when i put this command (npm install react-reveal --save) I have this problem, and i don't how i can resolve this problem, if a person had this problem or know how resolve this problem. can help me please thank you.
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: portfolio-sebastien#0.1.0
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! react#"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^15.3.0 || ^16.0.0" from react-reveal#1.2.2
npm ERR! node_modules/react-reveal
npm ERR! react-reveal#"*" 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/sebastienfirouzfar/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/sebastienfirouzfar/.npm/_logs/2021-06-17T08_40_33_036Z-debug.log
This is because react-reveal has not been updated in about 4 years as you can see here https://github.com/rnosov/react-reveal. Its dependencies are looking for react 15 or 16. You have react v17 so its throwing an error that it might not work with that version.
I can confirm that react-reveal works fine for me with react v17. But you will need to install react-reveal with this command:
npm i react-reveal --legacy-peer-deps.
Or if you already have the packages in your package.json then you can install everything without the errors by using npm i --legacy-peer-deps.
An alternative option is that you can ditch react-reveal and use react-awesome-reveal instead. This package does similar fade and reveals for react but its API is slightly different and does not have all the advanced features of react-reveal. This would only be a replacement if you were using only the basic features of react-reveal.
You are having this problem probably because of cache or npm version so I will try to give you most feasible solution.
1-Delete your node_modules and package-lock.json files from your project.
2-Run npm cache clean --force in termial
3-Run npm install
4-Run npm install react-reveal --save
If it does not work you should try with different node version. You can use nvm (node version manager) which allows you to use and switch multiple node versions in your computer.
just for a quick solution you can use npm i react-reveal --force

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.

Angular 2 Quickstart install failing via npm (Link - https://angular.io/docs/js/latest/quickstart.html)

As given in the link I've been trying to get Angular 2 running on my Ubuntu 15.10 machine but I get the following error messages and the install fails.
I also tried to install Angular 2 via the npm package command, that is sudo npm install angular2#2.0.0-alpha.32 but this gave the same sort of errors.
Any help would be appreciated. Thank you.
Here are the errors. The log it mentions at the bottom can't be posted here because it is over a 1000 lines.
sudo npm install
npm WARN package.json angular2-quickstart#1.0.0 No description
npm WARN package.json angular2-quickstart#1.0.0 No repository field.
npm WARN package.json angular2-quickstart#1.0.0 No README data
npm ERR! 404 Not Found
npm ERR! 404
npm ERR! 404 'angular/common' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404 It was specified as a dependency of 'angular2-quickstart'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.
npm ERR! System Linux 4.2.0-16-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/anshuman/angular2-quickstart
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code E404
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/anshuman/angular2-quickstart/npm-debug.log
npm ERR! not ok code 0
you must update your node and your npm for the last versions.
node -v
v4.4.7
npm -v
3.10.5
Also try to cleaar your npm cache
npm cache clear

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