I am trying to create a new Angular2 app using
ng new myAppName
This hangs on the line
/ Installing packages for tooling via npm
Its been sitting there for about an hour.
The previous time this happend I killed the process and tried re-running
ng new xxx
That failed because angular cli had some reference to the app name somewhere and thats whay I had to choose a new app name.
How do I get around this?
This is mostly because of bulky source map files. When you do ng serve , Angular serves the app from memory instead of the dist folder (the file system). This means the entire code (along with map files) will be loaded into the system's memory and this is the main reason why your system or IDE getting slow.
We use Angular CLI to help us to create the app. The Angular has come a long way since its first version in Angular 2. The creation of a new project is now as simple as installing Angular CLI and running the ng new command.
Error 1: 'ng' is not recognized 'ng' is not recognized as an internal or external command. This error is simply telling you that Angular CLI is either not installed or not added to the PATH. To solve this error, first, make sure you're running Node 6.9 or higher.
I was having the same issue. I resolved by using yarn. Follow below steps
Install yarn through npm using the below command
npm install yarn --global
Create your application using ng new
but skip installing packages using the below command. You can install them manually using yarn
ng new project-name --skip-install
cd project-name
yarn install
This will install your dependencies super-fast
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With