Is it possible to install angular2 cli inside a vagrant box?

446 views
Skip to first unread message

cedric...@gainestechnology.com

unread,
Jun 16, 2017, 2:26:08 PM6/16/17
to Vagrant
Hello,

I'm just getting started with Vagrant and so far it is awesome for what it provides.  I'm currently trying to build a angular 2 application and figured just build a vagrant box for it. 

So far I have my base install complete and running. ( config.vm.box = "bento/ubuntu-16.04" ) (I also have Node and NPM install as well.  All working and showing up as expected)

Once it all loads up, I vagrant ssh into the machine and try to install the angular cli ( npm install -g @angular/cli )
The issue is,
It starts off like its installing, but then freaks the heck out and a fast streams of messages just fly by and never stops until I stop the install.


Basically,
Is there something special I need to do to have the angular2 cli install on a vagrant box?

any help would be appreciated.

Thanks,

Antony Stone

unread,
Jun 16, 2017, 2:34:51 PM6/16/17
to vagra...@googlegroups.com
On Friday 16 June 2017 11:26:08 cedric...@gainestechnology.com wrote:

> Hello,
>
> I'm just getting started with Vagrant and so far it is awesome for what it
> provides. I'm currently trying to build a angular 2 application and
> figured just build a vagrant box for it.
>
> So far I have my base install complete and running. ( config.vm.box =
> "bento/ubuntu-16.04" ) (I also have Node and NPM install as well. All
> working and showing up as expected)
>
> Once it all loads up, I vagrant ssh into the machine and try to install the
> angular cli ( npm install -g @angular/cli )
> The issue is,
> It starts off like its installing, but then freaks the heck out and a fast
> streams of messages just fly by and never stops until I stop the install.

Any chance you could be a bit more specific with what you mean by "freaks the
heck out", and can you capture any of the messages so we have an idea what
you're dealing with?


Antony.

--
Software development can be quick, high quality, or low cost.

The customer gets to pick any two out of three.

Please reply to the list;
please *don't* CC me.

Cedric Gaines

unread,
Jun 16, 2017, 3:16:01 PM6/16/17
to vagra...@googlegroups.com
Sorry about that.  This message keeps repeating itself.

gyp verb tmpdir == cwd automatically will remove dev files after to save disk space
gyp verb command install [ '8.1.2' ]
gyp verb install input version string "8.1.2"
gyp verb install installing version: 8.1.2
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version not already installed, continuing with install 8.1.2
gyp verb ensuring nodedir is created /usr/lib/node_modules/@angular/cli/node_modules/node-sass/.node-gyp/8.1.2
gyp WARN EACCES user "root" does not have permission to access the dev dir "/usr/lib/node_modules/@angular/cli/node_modules/node-sass/.node-gyp/8.1.2"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/@angular/cli/node_modules/node-sass/.node-gyp"

And this message never stops scrolling.  (Not until I kill the process).

Thanks,
Cedric



-- 
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/s1kWCOSpfp0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/3172660.tiurhPzzV3%40pikantusdevuan.
For more options, visit https://groups.google.com/d/optout.

Antony Stone

unread,
Jun 17, 2017, 7:14:00 AM6/17/17
to vagra...@googlegroups.com
On Friday 16 June 2017 15:15:51 Cedric Gaines wrote:

> Sorry about that. This message keeps repeating itself.
>
> gyp verb tmpdir == cwd automatically will remove dev files after to save
> disk space gyp verb command install [ '8.1.2' ]
> gyp verb install input version string "8.1.2"
> gyp verb install installing version: 8.1.2
> gyp verb install --ensure was passed, so won't reinstall if already
> installed gyp verb install version not already installed, continuing with
> install 8.1.2 gyp verb ensuring nodedir is created
> /usr/lib/node_modules/@angular/cli/node_modules/node-sass/.node-gyp/8.1.2
> gyp WARN EACCES user "root" does not have permission to access the dev dir
> "/usr/lib/node_modules/@angular/cli/node_modules/node-sass/.node-gyp/8.1.2"
> gyp WARN EACCES attempting to reinstall using temporary dev dir
> "/usr/lib/node_modules/@angular/cli/node_modules/node-sass/.node-gyp"
>
> And this message never stops scrolling. (Not until I kill the process).

What operating system are you running under, and which user are you running
vagrant as?


Antony.

> > On Jun 16, 2017, at 2:34 PM, Antony Stone
> > <Antony...@vagrant.open.source.it> wrote:>
> > On Friday 16 June 2017 11:26:08 cedric...@gainestechnology.com
<mailto:cedric...@gainestechnology.com> wrote:
> >> Hello,
> >>
> >> I'm just getting started with Vagrant and so far it is awesome for what
> >> it
> >> provides. I'm currently trying to build a angular 2 application and
> >> figured just build a vagrant box for it.
> >>
> >> So far I have my base install complete and running. ( config.vm.box =
> >> "bento/ubuntu-16.04" ) (I also have Node and NPM install as well. All
> >> working and showing up as expected)
> >>
> >> Once it all loads up, I vagrant ssh into the machine and try to install
> >> the
> >> angular cli ( npm install -g @angular/cli )
> >> The issue is,
> >> It starts off like its installing, but then freaks the heck out and a
> >> fast
> >> streams of messages just fly by and never stops until I stop the install.
> >
> > Any chance you could be a bit more specific with what you mean by "freaks
> > the heck out", and can you capture any of the messages so we have an idea
> > what you're dealing with?
> >
> >
> > Antony.

--
f u cn rd ths, u cn gt a gd jb n nx prgrmmng

Cedric Gaines

unread,
Jun 17, 2017, 9:15:44 AM6/17/17
to vagra...@googlegroups.com
OS wise, it's 16.04 and I believe the user is 'vagrant'

Thanks
Cedric

Sent from my iPhone
> --
> This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
>
> GitHub Issues: https://github.com/mitchellh/vagrant/issues
> IRC: #vagrant on Freenode
> ---
> You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/s1kWCOSpfp0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to vagrant-up+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/10275360.pnKSKsRWJj%40pikantusdevuan.

Antony Stone

unread,
Jun 17, 2017, 9:30:17 AM6/17/17
to vagra...@googlegroups.com
On Saturday 17 June 2017 09:15:39 Cedric Gaines wrote:

> OS wise, it's 16.04 and I believe the user is 'vagrant'

Just to confirm, that's Ubuntu 16.04 running on your host computer, as well as
being the version of the Vagrant Box you installed?

Have you previously installed angular2 on any machine which isn't a Vagrant
Box, just to be sure the instructions you're following can be expected to
work?


Antony.
"When you talk about Linux versus Windows, you're talking about which
operating system is the best value for money and fit for purpose. That's a very
basic decision customers can make if they have the information available to
them. Quite frankly if we lose to Linux because our customers say it's better
value for money, tough luck for us."

- Steve Vamos, MD of Microsoft Australia

Cedric Gaines

unread,
Jun 17, 2017, 10:17:36 AM6/17/17
to vagra...@googlegroups.com
Yeah
I've installed it on just a regular setup with no problem. I've been doing a lot of googling and it appears that angular isn't as straight forward to run on vagrant as a regular dev stack such as lamp and such.

I guess back to local host for angular 2 dev unless I can find a non hack way to set this up :(

Sent from my iPhone
> --
> This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
>
> GitHub Issues: https://github.com/mitchellh/vagrant/issues
> IRC: #vagrant on Freenode
> ---
> You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/s1kWCOSpfp0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to vagrant-up+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/1556421.pBWJJWAKUE%40pikantusdevuan.

Alvaro Miranda Aguilera

unread,
Jun 19, 2017, 10:04:33 AM6/19/17
to vagra...@googlegroups.com
Hello.

Can you run the commands manually as the vagrant user and see how it goes?

By default Vagrant will run the provisioning scripts under root using sudo

you can add ,privileged: false to stop that.

Alvaro.

>>>>> On Friday 16 June 2017 11:26:08 cedricgaines@gainestechnology.com
> To unsubscribe from this group and all its topics, send an email to vagrant-up+unsubscribe@googlegroups.com.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/1DED4F0B-1EC9-4C16-9FA7-0A7C8E1F5B20%40gainestechnology.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

kay

unread,
Jun 24, 2017, 11:29:38 AM6/24/17
to Vagrant
Hi - I am also having this problem but on AWS when using Ubuntu 16.04 server (ami-d15a75c7).  After starting up the VM, I run the following commands before installing angular.

sudo apt-get update

sudo apt-get install python -y

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get install -y build-essential

sudo npm install node-gyp -g
sudo npm install -g @angular/cli

This results in the exact same error (see attachment)
>>>>> On Friday 16 June 2017 11:26:08 cedric...@gainestechnology.com
> To unsubscribe from this group and all its topics, send an email to vagrant-up+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/1556421.pBWJJWAKUE%40pikantusdevuan.
> For more options, visit https://groups.google.com/d/optout.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.



--
Alvaro

aws_angular_install_error

Cedric Gaines

unread,
Jun 24, 2017, 6:04:08 PM6/24/17
to vagra...@googlegroups.com
Agreed,

Still haven't figured out how why this happens and there is very little online in regards to help or solutions. I basically concluded that Angular CLI can't be used in vagrant type environments, at least not yet. 

For more options, visit https://groups.google.com/d/optout.
<aws_angular_install_error>

kay

unread,
Jun 27, 2017, 8:13:30 PM6/27/17
to Vagrant
Hi.

I figured out this problem (for my use case).  It arises when you use 'sudo' to install global libraries.  Instead of using 'sudo', use this article here to fix your permission problems.  Hopefully this will solve it for you too:

Reply all
Reply to author
Forward
0 new messages