Mac OSX Sierra
angular-cli: 1.0.0-beta.18
node: 6.9.1
When I start new project by using ng new project, its quickly finishes all the first steps and get stuck at the line below:
Successfully initialized git.
Installing packages for tooling via npm.
I left it for close to an hour and nothing happened. So I terminated the command and tried ng serve, it seems to work. So what could be the problem? I am not getting any error messages too.
That's a npm
message. When you do ng new project
, the CLI runs npm install
after creating the project files. The message you see is from npm
, and there isn't much we can do about it.
Maybe there's something wrong with your npm
install? You can also try doing ng new project --skip-npm
and it won't run npm install
afterwards, and you can do it manually.
Did you try sudo ng new project
on Mac? Keep in mind that node install can take a while
Apparently, the latest version for ng cli uses --skip-install
instead of --skip-npm
.
That resolved the issue for me though...
thanks @acidjames , I was struggling with that --skip-npm
.
@filipesilva, about the Installing packages for tooling via npm
failing problem.. I'm having it too, and I think it might be a permission problem related to the ng
user, because if go into the folder created by ng new
and execute $ npm install
it works without any problem and $ ng serve
will run properly
I came here because I had the same issue. it seems it just takes a long time. After waiting awhile then googling the issue and switching back to my console it said Installed packages for tooling via npm.
and Project 'xxx' successfully created.
So it should eventually work :)
I can confirm @LiamKenneth comment, waiting simply resolves the "issue". The process gets finished and the message gets shown that notifies you about the successful project creation.
Although, what's taking it so long? Also a new issue should be created to show some sort of progress so it's clear it's doing something and hasn't just crashed.
@esafwan I also had this same issue. I have resolved in three steps
(1) Node version updated
(2) used comment : ng new project --skip-install
(3) Made disk space enough for installation.
why not just verbose the creation so people dont wonder what's going on
(btw, with the latest version (1.0.0-beta.28.3) it works with --skip-npm...--skip-install having the install wait forever)
thank you for this --skip-install command 馃憤
I had a similar issue. First, when creating a new angular project via command
$ng new projectName
, it was spitting the error below.
Successfully initialized git.
Installing packages for tooling via yarn.
ERROR: [Errno 2] No such file or directory: 'install'
Package install failed, see above.
I was able to resolve this error by the command,
$ npm install -g yarnpkg
Then finally after issuing the command
$ ng new mainProject
it took a very long time but finally it worked as shown below.
Successfully initialized git.
Installing packages for tooling via yarn.
Installed packages for tooling via yarn.
Project 'mainProject' successfully created.
I agree with @LiamKenneth and @mnemanja that waiting resolves the issue.
I successfully got this message
Successfully initialized git. Installing packages for tooling via yarn. Installed packages for tooling via yarn. Project 'mainProject' successfully created.
but the directory was empty , any ideas about that ?
I am not seeing "Successfully initialized git." at all. I see only "Installing packages for tooling via npm" and it hangs there forever
no need to worry much guys....
It worked, you just need to be a little patient, just give it few minutes if you have updated your npm,
I have to wait roughly about 10 minutes and then I got
Installing packages for tooling via npm.
Wait 10 minutes
Installed packages for tooling via npm.
Successfully initialized git.
Project 'my-app' successfully created.
Need to wait to get this installed.
It takes time to create project. There is no issue.
These steps resolved the issue for me:
node v6.11.2
npm v3.10.10
angular-cli: 1.0.0-beta.28.3
Be patient you might have to wait few minutes it'll get installed and following message will appear .
Installing packages for tooling via npm.
Installed packages for tooling via npm.
Directory is already under version control. Skipping initialization of git.
Can someone work on pairing down the number of dependencies needed? Waiting 10 minutes for creation of a new project to "test something out" is crazy IMO.
A simple Hello Angular projects is 200+ MBs in size and looking at task manger I can say npm seems to be working really hard. Fun part is I used to think Android Studio is slow but now Android Studio can create new project on my PC quicker than npm.
I guess many people are facing this issue. Really a frustrating experience from NG CLI. Now even angular 5.x has released but such issues still remain!
so I have it figured out it now and there are TWO main reasons for this
ng new hello-world
) is around 180-200 Mb. So it depends on your internet speed which might be having connectivity issues (may be from the npm server side ! )I had the same Issue, so I just visited this page, But it was seriously taking a lot of time, so I checked the node_modules folder and it had about 803 folders, I assumed it was complete, When it was still saying, "Installing packages via npm", I just Hit ENTER/RETURN , "Installed packages for tooling via npm.
Project 'my-app' successfully created." Maybe hitting ENTER/RETURN did the trick.
stuck at "Installing packages for tooling via yarn."
@lightyaer Thanks! it worked. I just kept on seeing my screen for about 25mins to get app created successfully. But as you said, i checked the folder and i could find 727 folders in node_modules. I hit enter on the terminal. Within a minute may be, i got the success msg. Thanks!
It is the npm install that takes time, to visually see progress.
Reopening due to the report by @lightyaer that pressing enter seems to finish it. That's really odd. I don't know why that can be.
Do you always get that behaviour?
Nope.. Just the first time coz, I was doing npm install on my work pc, where usually most of the sites are blocked.. So I asked my System Admin to unblock everything, then hit npm install, it went on for like ever, when I pressed return/enter, it seemed to be done.... Then again, I purposely deleted node_modules and hit npm install, it was done in about 5 mins successfully.
Hi guys, what is the status of this issue? I still get the message Installing packages for tooling via npm...
@oshingc
Its just a very big download. Leave your system for an hour minimum and everything will be fine
I don't think --skip-install is a fix or a workaround, because, i still have to run npm install, and that also take so long... or i'm missing something?
Ps.: Even using --progress=false
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
I came here because I had the same issue. it seems it just takes a long time. After waiting awhile then googling the issue and switching back to my console it said
Installed packages for tooling via npm.
andProject 'xxx' successfully created.
So it should eventually work :)