Angular Template in MVC Core does not install the npm packages - angularjs

I have created a new applicationWeb Core + Angular template in VS 2017. But in the npm nodes all angular files are marked as not installed. What should I do?
Here is screenshot

Open a command prompt in the solution directory and type the command:
npm install
Note: you must have node.js installed (NodeJs)

Related

How do I add npm packages into visual studio 2019 with .net core project?

I am using react for front end along with .net core in backend. I am told to to use visual studio 2019 to work with .net core and this is the first time I am using visual studio. I installed react + redux template and I am wondering how can I add npm packages such as react-table or #material-ui/core in my project ? Can I just straight add to dependencies inside package.json file like "#material-ui/core": "version" and will it automatically install when I save ? And also how do I uninstall npm packages as well ?
To install npm packages into your project just simply use
npm install <package name>
To uninstall you use
npm uninstall <package name>
You need to use these commands within the terminal.
You can open a integrated terminal window in vscode:
https://code.visualstudio.com/docs/editor/integrated-terminal

No `package.json` file found. Make sure you are running the command in a Node.js project

I am building a AngularJS file with typescript and installed tsd for typedefinitions globally. When I try to run the following command on the root of my project folder I am getting an error
I am new Angular JS using version 1.7. I am not sure if Package.json is needed for AngularJS project
Command
tsd install angular --resolve --save
Error
No package.json file found. Make sure you are running the command in a Node.js project.
package.json is required for node projects to specify metadata about project and include some important commands that may be required for the project build. First you have to install node from official website. You can google for the step by step installation. Once installed, goto your project directory and run this command. Make sure to perform "npm init" before you run the desired angular command.
Note: Ensure, node is accessible through cli
tsd is deprecated use #types node modules
npm i #types/angular --save

npm install connect issue

I am new to node.js. I have been undergoing Angular.js Pro by Adam Freeman
As per the installation step:
I need to setup the web server for angular.js application using nodejs.
Accordingly i installed node.js version 6.11.0 in the path:
C:\Program Files\nodejs
Next step is to install connect module of nodejs using the command npm install connect.
I am getting the below error message when doing so.
shell output here
Can please anybody help with this.
You don't have to do that in the node.js path.
You can head over to a new directory say ~/desktop/temp
And then first do npm init, which would set the project to use npm. It would ask a couple of questions.
Post this, do npm install connect
Well, you need to start clean in an empty folder of your choice. This will be your project folder.
cd into it, then run npm init
Now you're ready to npm install whatever packages you need.

Angular installation

I want to install Angular version 4.* on my windows 7.
I am currently using Angular version 1.6.*
I tried following command
npm install #angular/{common,compiler,compiler-cli,core,forms,http,platform-browser,platform-browser-dynamic,platform-server,router,animations}#next --save
But its not working
Can any one please guide me to install and to create angular 4 project..
Make sure you have node version above 6.9 and npm above 3
Check the version by using node --version and npm --version
Install angular cli using npm install -g #angular/cli
-g installs the angular globally on your system and you just have to run this command only once
Create the angular project using ‘ng new angularprojectname’
Go to that project folder and check the angular version by ‘ng -v’
Upgrade this version to angular 4 by running this command-
For Windows-
npm install #angular/common#next #angular/compiler#next #angular/compiler-cli#next #angular/core#next #angular/forms#next #angular/http#next #angular/platform-browser#next #angular/platform-browser-dynamic#next #angular/platform-server#next #angular/router#next #angular/animations#next --save
For Linux/Mac-
npm install #angular/{common,compiler,compiler-cli,core,forms,http,platform-browser,platform-browser-dynamic,platform-server,router,animations}#next --save
Make sure to upgrade the typescript version by running command-
npm install typescript#2.2.1 --save
Ignore whatever warning it shows up and now check the angular version by ‘ng -v’
The version has changed from 2.2.4 to 4.1.0
You can also check all the info about your angular cli in package.json file.
You just need to install npm -g install angular-cli
And write sudo if you are using mac or ubantu
Then go to directory where you want project and then ng new PROJECTNAME
It will create project
Hope it helps you
I am adding this to update the answer.
If you want to install the latest angular version others answers are for you.
If you want to install a specific version of angular (Get your version number here)
You should use the below command.
npm install -g #angular/cli#VERSION_NUMBER
for example, if you want to install angular 1.4.9 command should be like below
npm install -g #angular/cli#1.4.9
I have also found the same issue while installing.
Please Do check npm and nodejs version and upgrade them.
I'd like to recommend node v6.x.x and npm 4.x.x or higher
There are many ways to structure AngularJS applications. When you begin to upgrade these applications to Angular, some will turn out to be much more easy to work with than others. There are a few key techniques and patterns that you can apply to future proof apps even before you begin the migration.
Follow the AngularJS Style Guide
Using a Module Loader
Migrating to TypeScript
Using Component Directives
Upgrade with ngUpgrade
Or up can follow the official document of Angular
For installing Angular 4 follow below simple steps:
Install node.js and npm(they are required dependencies. npm is automatically installed on installing node.js). You can install it
from here
With the help of npm install angular CLI. Type the following command in your command prompt: npm install -g #angular/cli
If you are still facing some problems you have to install git. You can install it from here
Now to create an angular 4 project using Angular CLI type the following command:
ng new [Project_Name]
This will create an Angualr 4 project.
5.To start the server and get your project up and running type following in command line:
ng serve
Remember you should be inside the project folder before starting the server. Hope this helps.
You have some libraries, Like
angular-material, angular-cdk`
etc...
Add all those and Try.
It will work for sure.
And you will be able to run the project
Install angular cli globally.
npm install -g #angular/cli
Get git pull from repository:-
[https://github.com/blazehub/ng-cli-starter.git]
to get ready made production ready project structure.
If you are looking for latest angular version use this command to install
npm -g install #angular/cli

Why does the command " ionic serve " in git bash gives an error?

I'm trying to run an ionic server through git bash on windows but its failing and showing an error
Couldn't find ionic.config.json file. Are you in an Ionic project?
Here are all the possible solutions
From a recent update just rename the ionic.project to ionic.config.json
and install bower since ionic requires bower using npm i bower
and see to it that you are running command in your project folder only

Resources