IntelliJ - Bower command not found - intellij-idea

I'm trying to initialise bower on a AngularJS project created with IntelliJ.
I could install it correctly in the project using
npm install bower
But when I run
bower init
I get
bower: command not found
even if I can see it in my project, into the node_modules folder.
What am I doing wrong?
Thanks,
da

You need to install bower globally, so it would link bower as command.
npm install bower -g
Edit:
There is a way how to use local bower install.
Use:
alias bower="./node_modules/bower/bin/bower"
And now you can use
bower init

You have to install bower globally, to access it via terminal.
Project/folder specific bower install will be useful if you do continuous integration or continuous deployment.
npm install bower -g

Related

Error while installing expo-cli with npm and yarn

I don't know whats's wrong with my system I am trying to setup expo-cli with yarn global add expo-cli the expo init projectname doesn't work and its getting me same problem when I am trying to install with sudo npm install expo-cli --global?
This is the problem with yarn https://i.stack.imgur.com/q518S.png
&
This is the problem with npm https://i.stack.imgur.com/ojF0h.png
yarn install worked but directory where yarn puts executables for packages is not added to your PATH. If you add it there it should work.
If you want to go with npm, I would strongly recommend to never run npm install with sudo. Use tools like nvm or volta. It will install node, npm and all other packages in your home directory, it should solve all issues with permissions without giving access to your entire system.
https://github.com/nvm-sh/nvm
Try avoiding the global npm install with npx expo-cli
Alternatively, try sudo npm install -g --unsafe-perm expo-cli to install the package globally through root. This seems to be a common error with Ubuntu, more information can be found here: https://github.com/expo/expo-cli/issues/591

Gulp doesn't work after reinstalling Windows

Upon reinstalling Windows 10 (and Node.js), the gulp command isn't found. I ran it from my root folder containing package.json and the node_modules folder. I tried npm install gulp, and also npm install: gulp command still not found. I'm a bit puzzled.
Any idea?
do you re install node and npm again? when you re install node try with npm install -g gulp
npm install -g gulp will install gulp globally, so that you can use it as a command.
A better way to do it, is to use npm install gulp (without the -g) to install it into each local project, and fire it off using npm start scripts in each project's package.json.

Demo using Aurelia- can not install jspm

I following this link https://github.com/rmourato/Mvc5-Aurelia
I can not install jspm and run project
I already install nodejs
Can anyone help me on this.
Next to nodejs (which installs npm) you also need to install gulp and jspm.
So change into the Mvc5-Aurelia/Aurelia directory and run:
npm install
npm install -g gulp
npm install -g jspm
More details here: https://github.com/rmourato/Mvc5-Aurelia/tree/master/Mvc5-Aurelia/Aurelia under Running the App
After that you can run gulp watch

IntelliJ cant see npm plugins

My IntelliJ is not seeing my karma plugins:
WARN [plugin]: Cannot find plugin "karma-ng-extjs-scenario".
Did you forget to install it ?
npm install karma-ng-extjs-scenario --save-dev
WARN [plugin]: Cannot find plugin "karma-jasmine".
Did you forget to install it ?
npm install karma-jasmine --save-dev
WARN [plugin]: Cannot find plugin "karma-chrome-launcher".
Did you forget to install it ?
npm install karma-chrome-launcher --save-dev
WARN [plugin]: Cannot find plugin "karma-firefox-launcher".
Did you forget to install it ?
npm install karma-firefox-launcher --save-dev
I believe it is because i was following a tutorial that told me to install them globally.
But then i realised that i wanted to install them locally and save to the package.json.
I try again to install locally and it doesnt fix it:
$ npm install karma-jasmine --save-dev
npm WARN package.json karma-ie-launcher#0.1.5 No README data
info trying registry request attempt 1 at 21:06:11
http GET https://registry.npmjs.org/karma-jasmine
http 304 https://registry.npmjs.org/karma-jasmine
karma-jasmine#0.1.5 ../../../node_modules/karma-jasmine
I can however run karma from within my project from the command line and the plugins exist in the npm modules directory.
Is there a way to fix this or do i need to reinstall the packages from scratch? If so, what is the easiest way of doing that?
the --link flag linked the global install into the local directory.
npm install karma-jasmine --save-dev --link

Installing/Using Bower on Uberspace with NPM

Hi I use uberspace and installed ghost there. Ghost uses npm.
If I try:
npm install -g bower
It doesn't install it and throws a lot of erros messages what makes sense because the server is shared between many users.
sudo npm install -g bower
Tells me that it doesn't know bower
If I install it locally with
npm install bower
It installs it to ../node_modules. But using for example
bower install angular-mailchimp
Throws the error:
-bash: bower: command not found
How do I get it running?
I was able to get Bower installed in the correct place by prefixing the global install with the following command.
npm install -g --prefix=$HOME bower