npm install error not installing BrowserSync package - node.js

Trying to install BrowserSync
I've followed the steps to install the package through the command line, installed node.js and then I went on to install npm through the command line.
Now when I try to install browser-sync with the following line npm install -g browser-sync you will see it is not recognized when I check the version and its the same when I try do anything like start --server?
note tried installing another package as a test jshint successfully installs/uninstalls but displays the same message when checking its version.
Any suggestions?

Have you tried like below? (http://www.browsersync.io/#install)
npm install -g browser-sync
-g means global.

Related

ng: command not found after installing node and angular cli

I just got a new clean MacOS Catalina installation, and I was trying to get my old project running using ng serve but it tells me that 'ng: command not found' I installed the npm 6.12.1 through nodeJS 12.13.1 installation as well, and ran 'npm install -g #angular/cli' and both ran without issues, then ran the npm i command for the stuff included in package.json in the same project directory, I googled around and one comment suggested using npm link #angular/cli which didn't differ as well
Try to restart your terminal after running npm install -g #angular/cli
Add npm global modules folder to your $PATH variable with the following command
export PATH="$HOME/.npm-packages/bin:$PATH"

Problems installing Vue js

I am trying to install vue.js with no success, yet npm is up to date.
When I run vue init webpack vueapp I get this error:
No command 'vue' found, did you mean:Command 'vpe' from package 'texlive-latex-extra' (universe)
vue: command not found
I have already installed the cli using npm install vue-cli.
Thanks
Try to use npm install -g #vue/cli and then vue ui to start client in your browser.
You'll want to use npm install -g #vue/cli. Restart your terminal to make sure it shows up.
Also, make sure you have node 8.9+
From the docs:
Warning regarding Previous Versions
The package name changed from vue-cli to #vue/cli. If you have the previous vue-cli (1.x or 2.x) package installed globally, you need to uninstall it first with npm uninstall vue-cli -g or yarn global remove vue-cli.
Node Version Requirement
Vue CLI requires Node.js version 8.9 or above (8.11.0+ recommended). You can manage multiple versions of Node on the same machine with nvm or nvm-windows.
For me sudo helps to solve it.
Try to use this command in terminal:
sudo yarn global add #vue/cli
Then you can check the version and all will work correctly.
vue --version
Have you installed view?
Can you check vue --version
https://cli.vuejs.org/guide/installation.html
Try to use sudo npm install -g #vue/cli instead of npm install -g #vue/cli
You need to use sudo.
The vue-cli documentation at https://cli.vuejs.org/guide/installation.html states that:
To install the new package, use one of the following commands. You
need administrator privileges to execute these unless npm was
installed on your system through a Node.js version manager (e.g. n or
nvm).
npm install -g #vue/cli
# OR
yarn global add #vue/cli
Just run npm install -g pnpm for the missing packages.
Then you can run npm install -g #vue/cli
Now you can ckeck the vue --version
sudo npm install -g #aws-amplify/cli --unsafe-perm=true
It works for my situation.

angular cli install command showing errors

npm install -g #angular/cli
I am trying to install angular cli on Windows 10, I have already installed npm and node, and have verified their version, they are above then what is required for angular cli to install but when I run install command on the prompt it show error.
i have uninstalled npm and node, then reinstalled them, and tried again to install and it worked :) thanks
first try to see node and npm is installed successfully using following commands on cmd
node -v
for node and it will return the version of node,then
npm -v
then it will return the version of npm after that in windows go to environment variables and see node environmental varible is there. after that
npm cache clean --force
use to clean the cache and go to users/Appdata/roaming and delete all the node modules in npm cache folder and restart your computer and give the following command.
npm install -g #angular/cli

npm install from package.json, the dependancy -v yields command not found

Reinstalled node/npm from scratch and after npm install I can see the node_modules folder with all of the content from package.json. Checking gulp -v gives command not found in the command line on a mac. If I install gulp globally, gulp -v yields the version.
Is there a way of not installing all dependancies globally to use?
Generally gulp is a package which is used to run some task. These task might need to have administrator privileges. So it is better to install it globally using "npm install -g gulp" command. Here -g means "install it globally".
npm install installs the package locally.

Grunt is not recognised : windows7 64-bit

I have installed npm and installed grunt, but when i run grunt, it says 'grunt' is not recognized as an internal or external command.
I done the below steps in command prompt
npm install
npm install -g grunt-cli
PATH variable and grunt folder are available but still i am not able to run grunt.
Please provide me a solution for this
You have only installed the command line interface.
Use npm install -g grunt to install the actual program.

Resources