I have tried different option to install node latest version in ubuntu 16, it was always taking node 4,
I have followed link
and now node -v gives me 8.X than I have installed npm after that I am trying to install angular, its breaking error is in screen shot attachment
I know it required npm 5.5.1 but how do I install that, I have used command
npm install -g npm#latest
,
when I run command ng new myapp1 it gives error
This command can not be run inside of a CLI project.
it didn't work finally, what can I do next
Use These command for Install Angular Cli & Create Angular Project
npm install -g #angular/cli
ng new my-dream-app
cd my-dream-app
ng serve
And if you want to install latest Node check this
Note Use Sudo before NPM commands if you not have directory permissions.
Related
Hello I am trying to create a react app I read the documentation that I first have to run this command if I had installed. npm uninstall -g create-react-app I did that because I had installed initially then thereafter I run the following command that they said on the docs that one should run to ensure that npx is running on the latest version: npx create-react-app FirstApp
I then go this following error message:
Install for ['create-react-app#latest'] failed with code 7
So I then checked if I do have installed node properly I then ran:
npm -v my version being 6.13.4
So I am wondering if this has to do with the version or something else?
I'm trying to install react on windows 10 using npm install -g create-react-app.
The install fails and I get the following error message:
Error: EINVAL: invalid argument, mkdir 'C:\Program Files\Git\'C:\Users\User\AppData\Roaming\npm''
I should mention that I installed nodejs version 12.16.3 LTS on my windows machine right before I got this error.
Does anyone know why this is, or if there's a solution to this problem?
Please help!
First of all you are not trying to install react. You are trying to install create-react-app terminal tool. With that tool you can easily create react projects.
Let's do some checks first.
# Remove if you have installed it before
npm uninstall -g create-react-app
# Check if you have installed 'git' (if not install git)
git --version
# Check node.js (if not install node.js)
node --version
# Check npm (if not install npm)
npm --version
If they are all installed, now you can start installing create-react-app. I am not windows user but i would suggest you to use powershell. On linux i would use sudo command for this install.
# install create-react-app
npm install -g create-react-app
# check if it is installed
create-react-app --version
I'm trying to work with AngularJS but I can't even get pass installing it via Terminal.
I enter this onto the command line
npm install -g #angular/cli
I get this as a result
- bash: npm: command not found
I seem to be getting this same error log on almost every command, the rest return nothing
I'm stumped as to why it's not working.
For reference I'm using OS X 10.9.5
Make sure you got node installed which comes with npm
https://nodejs.org/en/
You error looks like you don't even have node installed on your computer, first of all, you need to install node js on you computer, once you’ve installed Node.js, you can make sure you’ve got the very most recent version of npm using npm itself: sudo npm install npm -g.
Then you can continue your installation with the step below:
To install #angular/cli locally run npm install #angular/cli --save, while to install it globally run npm install -g #angular/cli.
But if it requires a root access, then you have to include the sudo which will then be sudo npm install -g #angular/cli.
I figured it out. I needed to adjust the .bash_profile by entering this
echo "export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin" >> ~/.bash_profile
Thanks to everyone who gave advice :)
On my Windows 7 machine, I'm unable to update/uninstall an existing global angular-cli instance following the approach outlined here https://github.com/angular/angular-cli
using these following commands
npm uninstall -g #angular/cli
npm cache clean
npm install -g #angular/cli#latest
i tried to uninstall angular cli then nodejs and afterwards installed latest nodejs and angular cli.
then after when i run ng -v i get errors. so i want to manually uninstall node , npm and angular cli globally and locally completely so that i can install fresh copy.
Trying to just startup a simple angular app via Yeoman, using steps in this guide
http://www.sitepoint.com/kickstart-your-angularjs-development-with-yeoman-grunt-and-bower/
and get this error when trying to run grunt or grunt server:
Loading "Gruntfile.js" tasks...ERROR
Error: Cannot find module 'load-grunt-tasks'
Warning: Task "default" not found. Use --force to continue.
Here are my versions:
yo --version && grunt --version && bower --version
1.1.2<
grunt-cli v0.1.13
grunt v0.4.4
1.3.1
See screencast of this in action:
http://screencast.com/t/4ToPw3SlL2
I just encountered the same problem today, managed to resolve it with the answers here.
Basically I needed to update npm to latest version,
by using this command (the npm which came with Node-v0.10.29 package was outdated)
npm update npm -g
or
sudo npm update npm -g (i used this command on my mac)
Then type this command
npm --version (it should show 1.5.0-alpha-4 or later version)
Then type the grunt serve command
grunt serve
If you still have issues, then try running these commands
npm install
or
sudo npm install (i used this command on my mac)
Then try grunt serve command again,
grunt serve
This time, it worked for me.
If it didn't, then try this command
bower install (i did not have to use this command)
Run the following commands from the directory that has the Gruntfile.js for your project:
npm install
npm install -g bower
bower install
This will install all npm and bower based dependencies for your project.
In the screencast at 1:18 it shows install errors tied to at least multimatch. load-grunt-taskis dependent on multimatch.
Installed "load-grunt-tasks" module locally
ie
npm install load-grunt-tasks
instead of
npm install -g load-grunt-tasks