How do you uninstall Bower (the package manager)? - uninstallation

How do you uninstall Bower? I mean the package manager, not the packages (that I have already uninstalled).

To uninstall global package :
npm uninstall -g bower
See this thread : how to uninstall npm modules in node js?

sudo npm uninstall -g bower
Sudo: to do it as an superUser/administrator
-g : to try it globally

sudo npm uninstall -g bower
sudo npm remove -g bower
sudo npm rm -g bower
npm Uninstall aliases remove, rm, r, un, unlink reference

Related

AWS CDK python client giving error with cdk deploy

My stack:
python 3.6
Node.js 11.3.0
jsii-0.20.11 (automatically installed when aws cdk is installed via npm)
I just tried cdk init and then did pip install -e.
After that, I did cdk deploy and it gives me the following error:
Traceback (most recent call last):
File "app.py", line 3, in <module>
from aws_cdk import core
File "C:\Users\sgoud12\myfolder\myprojects\myapp\cdk\.env\lib\site-packages\aws_cdk\core\__init__.py", line 1967, in <module>
class DependableTrait(metaclass=jsii.JSIIAbstractClass, jsii_type="#aws-cdk/core.DependableTrait"):
TypeError: __new__() got an unexpected keyword argument 'jsii_type'
Subprocess exited with error 1
(.env) C:\Users\sgoud12\myfolder\myprojects\myapp\cdk>
(.env) C:\Users\sgoud12\myfolder\myprojects\myapp\cdk>fs.js:122
throw err;
^
Error: EOF: end of file, read
at Object.readSync (fs.js:517:3)
at SyncStdio.readLine (C:\Users\sgoud12\myfolder\myprojects\myapp\cdk\.env\lib\site-packages\jsii\_embedded\jsii\jsii-runtime.js:13350:25)
at InputOutput.read (C:\Users\sgoud12\myfolder\myprojects\myapp\cdk\.env\lib\site-packages\jsii\_embedded\jsii\jsii-runtime.js:13300:34)
at KernelHost.run (C:\Users\sgoud12\myfolder\myprojects\myapp\cdk\.env\lib\site-packages\jsii\_embedded\jsii\jsii-runtime.js:7231:32)
at Immediate.setImmediate (C:\Users\sgoud12\myfolder\myprojects\myapp\cdk\.env\lib\site-packages\jsii\_embedded\jsii\jsii-runtime.js:7239:37)
at processImmediate (timers.js:632:19)
It usually means some kind of versions missmarch: aws-cdk in npm and aws-cdk in python. Given that it's a pretty old question I suppose updating all packages or even reinstall the environment should help.
There are mentions of a similar problem in the official aws-cdk bug tracker:
https://github.com/aws/aws-cdk/issues/3349
https://github.com/aws/aws-cdk/issues/3293
I agree, this is frustrating and hard to find a fix for. Using the links from #Trilliput
My Steps:
Uninstall pip
Update homebrew
Remove the aws cli
Reinstall the aws cli
uninstall aws cdk
reinstall aws cdk
Commands:
sudo pip uninstall pip
brew update
sudo rm /usr/local/bin/aws
sudo rm /usr/local/bin/aws_completer
sudo rm -rf /usr/local/aws-cli
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /
pip3 uninstall aws-cdk.cdk
pip3 install aws-cdk.cdk --use-feature=2020-resolver
That didn't work as I hoped, so I used all of these commands below. I called it to scorched earth reinstall:
sudo pip uninstall pip
brew update
sudo rm /usr/local/bin/aws
sudo rm /usr/local/bin/aws_completer
sudo rm -rf /usr/local/aws-cli
brew uninstall node
brew uninstall pyenv
# CLOSE your terminal window and open a NEW terminal window.
# when you run [which python] you should get /usr/bin/python
# run these commands to remove node and npm
https://gist.github.com/TonyMtz/d75101d9bdf764c890ef
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
python3 get-pip.py
brew install python3
# old CDK
pip3 uninstall aws-cdk.cdk
#new CDK
pip3 uninstall aws-cdk.core
# NEW CDK
pip3 install aws-cdk.core
#pip3 install aws-cdk.core --use-feature=2020-resolver
# reinstall aws cdk
npm install -g aws-cdk
npm install -g npm#7.0.13
sudo npm install -g npm#7.0.13
npm install -g aws-cdk
sudo npm install -g aws-cdk
sudo -i
sudo npm install -g aws-cdk
cdk --version
Bumping up the python version from 3.6 to 3.7.5 worked like a charm for me

How to install AWS SAM Local on Ubuntu 16.04?

I am trying to install AWS SAM (Serverless Application Model) Local on Ubuntu 16.04.
I tried to install SAM Local using NPM with the following command.
npm install -g aws-sam-local
I got the following error.
Please help me to sort it out?
Installation on Ubuntu 16.04/18.04
sudo apt-get install python3-pip -y
sudo -H python3 -m pip install aws-sam-cli
First try
npm config set unsafe-perm=true
I also installed node v8.11.1
The standard shebang for node is #!/usr/bin/env node. There is a package conflict with the name node, so it's named nodejs.
You can solve the issue with a symlink using alternatives.
sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10
first try
npm install -g go-npm
then
npm install -g aws-sam-local
If issue with current user permissions, please use sudo with below commands
First try,
npm config set unsafe-perm=true
Then,
npm install -g go-npm
finally,
npm install -g aws-sam-local
It will also work for mac.

gulp: command not found

when i run gulp in cmd it says gulp: command not found
though when i checked
npm root (Path Local)
/var/www/html/gus/node_modules
npm root -g (Path Global)
/Users/zohaib/npm-global/lib/node_modules
i followed these rules though these are for OsX and im having ubuntu 16.04
To install gulp in Ubuntu, mentioned below are the steps:
sudo apt-get install node
sudo apt-get install npm
sudo npm install --global gulp
sudo apt-get install nodejs-legacy
sudo npm install
Then run gulp.

How to upgrade ember cli version

I upgraded ember-cli to version 2.4.3
npm install -g ember-cli
I can see -- ember-cli#2.4.3 , in the listed dependencies,
but when I check :
(master *)$ ember -v
version: 2.4.2
node: 5.6.0
os: darwin x64
ember cli version is still 2.4.2
what's wrong ?
Updating Ember-CLI's version and ember project's version are different thing.
To update Ember-CLI:
npm uninstall -g ember-cli
npm cache clean
bower cache clean
npm install -g ember-cli#1.13.14
To update your project:
rm -rf node_modules bower_components dist tmp
npm install --save-dev ember-cli#1.13.14
npm install
bower install
ember init
Here is the resource: https://github.com/ember-cli/ember-cli/releases
I strongly recomend you to select which files will be overwritten. You should compare diffs of files. application.hbs, router.js, environment.js, ember-cli-build.js are important files those you don't want them to be overwritten.
UPDATE 2020-02-19:
ember-cli-update
handles updating your project.

Ember : downgrading ember with bower install

I've been switching to the 1.13.2 version of ember on a git branch, and now I want to come back to 1.11.1 when going back to an other branch.
I've been running npm install and bower install without failure.
But when I run ember server I run into the following error :
Missing bower packages:
Package: ember
* Specified: 1.11.1
* Installed: 1.13.2
Run `bower install` to install missing dependencies.
Running bower install again does not solve the problem, neither does bower cache clean.
Do
$ rm -rf bower_components
$ bower cache clean
$ bower install