How to build angularjs on windows

3,365 views
Skip to first unread message

Christoph Burgdorf

unread,
Sep 1, 2011, 12:23:52 PM9/1/11
to angular
Hi folks,

is any of you developing on windows? Are there instructions anywhere
about how to get started?

Bye

Christoph

Dan Doyon

unread,
Sep 1, 2011, 12:59:03 PM9/1/11
to ang...@googlegroups.com
Hi Christoph,

You have a couple of options, if you want to stick with windows then install ruby, node.js and git for windows ( i think this is all you need )




An alternative approach is to get Cygwin and run linux on windows, I think the github has a how to, you would need to get the above products in their linux versions.

hope this helps

--dan




From: Christoph Burgdorf <christoph...@bvsn.org>
To: angular <ang...@googlegroups.com>
Sent: Thursday, September 1, 2011 9:23 AM
Subject: [angular.js] How to build angularjs on windows
--
You received this message because you are subscribed to the Google Groups "angular" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+unsub...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.



Christoph Burgdorf

unread,
Sep 1, 2011, 1:31:52 PM9/1/11
to angular
Hi Dan,

I'm already using git on windows. What I mostly care about is getting
one file out of the different source files. Is this handled by a ruby
script today? If so, can you point me to it. I might volunteer to make
the windows build process easier.

Bye

Christoph

On 1 Sep., 18:59, Dan Doyon <dando...@yahoo.com> wrote:
> Hi Christoph,
>
> You have a couple of options, if you want to stick with windows then install ruby, node.js and git for windows ( i think this is all you need )
>
> http://rubyinstaller.org/
>
> http://blog.nodejs.org/
>
> http://code.google.com/p/msysgit/
>
> An alternative approach is to get Cygwin and run linux on windows, I think the github has a how to, you would need to get the above products in their linux versions.
>
> hope this helps
>
> --dan
>
> ________________________________
> From: Christoph Burgdorf <christoph.burgd...@bvsn.org>
> To: angular <ang...@googlegroups.com>
> Sent: Thursday, September 1, 2011 9:23 AM
> Subject: [angular.js] How to build angularjs on windows
>
> Hi folks,
>
> is any of you developing on windows? Are there instructions anywhere
> about how to get started?
>
> Bye
>
> Christoph
>
> --
> You received this message because you are subscribed to the Google Groups "angular" group.
> To post to this group, send email to ang...@googlegroups.com.
> To unsubscribe from this group, send email to angular+u...@googlegroups.com.

Dan Doyon

unread,
Sep 1, 2011, 2:07:11 PM9/1/11
to ang...@googlegroups.com
Christoph,

Something like.

C:\projects\angular.js\rake package 

in order for this to work you'll need ruby and node. Node is used to generate the docs. I downloaded latest ruby and it seems to work fine.

Your question actually got me thinking we could use a "how-to-contribute/build-angular on windows" FAQ, we could collaborate on this if you'd like. 

--dan


From: Christoph Burgdorf <christoph...@bvsn.org>
To: angular <ang...@googlegroups.com>
Sent: Thursday, September 1, 2011 10:31 AM
Subject: [angular.js] Re: How to build angularjs on windows
> To unsubscribe from this group, send email to angular+unsub...@googlegroups.com.

> For more options, visit this group athttp://groups.google.com/group/angular?hl=en.

--
You received this message because you are subscribed to the Google Groups "angular" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+unsub...@googlegroups.com.

Igor Minar

unread,
Sep 1, 2011, 2:19:53 PM9/1/11
to ang...@googlegroups.com
I think Vojta got angular to build once on windows just as an experiment and it kind of worked, but since none of us use windows, we didn't bothered to write our scripts in a windows friendly manner.

the rake files make many calls to *nix commands, so cygwin is the only option.

I think it should be doable if you don't mind figuring out all the hoops.

/i



To unsubscribe from this group, send email to angular+u...@googlegroups.com.

Christoph Burgdorf

unread,
Sep 1, 2011, 5:25:58 PM9/1/11
to angular
I thought about something pretty simple like that:
https://github.com/SteveSanderson/knockout/blob/master/build/build-windows.bat
Sure there are more things to consider like running the tests etc. But
just to get us started would it be ok to do something like that:

1. Grab the source files

2. Concatenate

3. Wrap them in an immediate function

This should be fine to get one started or not?

On 1 Sep., 20:19, Igor Minar <i...@angularjs.org> wrote:
> I think Vojta got angular to build once on windows just as an experiment and
> it kind of worked, but since none of us use windows, we didn't bothered to
> write our scripts in a windows friendly manner.
>
> the rake files make many calls to *nix commands, so cygwin is the only
> option.
>
> I think it should be doable if you don't mind figuring out all the hoops.
>
> /i
>
>
>
>
>
>
>
> On Thu, Sep 1, 2011 at 11:07 AM, Dan Doyon <dando...@yahoo.com> wrote:
> > Christoph,
>
> > Something like.
>
> > C:\projects\angular.js\rake package
>
> > in order for this to work you'll need ruby and node. Node is used to
> > generate the docs. I downloaded latest ruby and it seems to work fine.
>
> > Your question actually got me thinking we could use a
> > "how-to-contribute/build-angular on windows" FAQ, we could collaborate on
> > this if you'd like.
>
> > --dan
>
> > ------------------------------
> > *From:* Christoph Burgdorf <christoph.burgd...@bvsn.org>
>
> > *To:* angular <ang...@googlegroups.com>
> > *Sent:* Thursday, September 1, 2011 10:31 AM
> > *Subject:* [angular.js] Re: How to build angularjs on windows
> > > For more options, visit this group at
> >http://groups.google.com/group/angular?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "angular" group.
> > To post to this group, send email to ang...@googlegroups.com.
> > To unsubscribe from this group, send email to angular+
> > unsub...@googlegroups.com.

Igor Minar

unread,
Sep 1, 2011, 5:58:29 PM9/1/11
to ang...@googlegroups.com
we do some string replacements (e.g. for version number), so things might not work quite properly if you bypass the Rakefile.

/i

Christoph Burgdorf

unread,
Sep 2, 2011, 4:25:08 PM9/2/11
to angular
It sucks to be on windows at times. I'm thinking about picking up my
old notebook which runs ubuntu for angular work.
@Dan, does this mean you actually tried it and got it working? How
hard is it? Is it a lot to configure?

On 1 Sep., 23:58, Igor Minar <i...@angularjs.org> wrote:
> we do some string replacements (e.g. for version number), so things might
> not work quite properly if you bypass the Rakefile.
>
> /i
>
> On Thu, Sep 1, 2011 at 2:25 PM, Christoph Burgdorf <
>
>
>
>
>
>
>
> christoph.burgd...@bvsn.org> wrote:
> > I thought about something pretty simple like that:
>
> >https://github.com/SteveSanderson/knockout/blob/master/build/build-wi...

Dan Doyon

unread,
Sep 2, 2011, 5:02:22 PM9/2/11
to ang...@googlegroups.com
I had a little bit of hassle on mac , I had to upgrade some os apps to get everything in place but in the end I believe better route than trying windows

I did start to go down that road ... But have better things to do, not to say that we couldn't revisit

Sent from my iPhone

Vojta Jina

unread,
Sep 4, 2011, 5:15:50 PM9/4/11
to ang...@googlegroups.com
Developing with AngularJS on Windows is fine, there are *.bat scripts in angular-tutorial I hope.
I don't have Windows machine now, but I got everything working on Windows 7 couple of months ago, but it was pain...

To only build angular (without generating the docs etc..), you need to run: rake compile
There are some unix commands used inside the Rakefile, so you would have to change them into windows equivalent...
For example unix's cat can be replaced with windows type, I believe you can add cat.bat into Windows/System32 to get it working...

V.

Anthony Bullard

unread,
Sep 5, 2011, 3:39:20 PM9/5/11
to ang...@googlegroups.com
This is unfortunate, but I'm used to it with node already.  So I just run Win 7 to talk to my girlfriend back home or use Spotify, and I boot into Ubuntu for work/development.  I hope we one day can get this all ported to Windows, but Ubuntu is fine as long as I don't try to do anything involving audio, ugh.

--
You received this message because you are subscribed to the Google Groups "angular" group.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/1nEDHMAxi4sJ.

Ondrej Svačina

unread,
Oct 15, 2011, 4:24:40 PM10/15/11
to ang...@googlegroups.com
I'm building angular.js on a Windows box with cat.exe from http://unxutils.sourceforge.net/.
I tried to build it in the Windows PowerShell as it has a cat alias out of the box but rake seems to invoke the plain old Windows shell so cat stays undefined. With cat.exe in the path or dropped in the angular.js folder it compiles without error (rake compile).

rake package, however, does not work with the latest node.js (0.5.9):
node.js:203
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead.

Maybe it's a known issue, I don't know.

Igor Minar

unread,
Oct 16, 2011, 12:45:14 AM10/16/11
to ang...@googlegroups.com
Can you try stable node 0.4.x instead?

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/G7DfbnadArAJ.

Ondrej Svačina

unread,
Oct 16, 2011, 5:48:46 AM10/16/11
to ang...@googlegroups.com
As far as I know node.js has native Windows builds only since 0.5.x. Nevertheless I found a node.js 0.4.7 bundle with cygwin (http://www.rafaljonca.org/d/nodejs-windows) and got it moved on but it choked on a mysterious qq module:

node.js:134

        throw e; // process.nextTick error, or 'error' event on first tick
        ^
Error: Cannot find module 'qq'
    at Function._resolveFilename (module.js:320:11)
    at Function._load (module.js:266:25)
    at require (module.js:348:19)
    at Object.<anonymous> (/cygdrive/c/Users/username/Projekty/Externe/JS/AngularJS/0.10.3/docs/src/reader.js:10:9)
    at Module._compile (module.js:404:26)
    at Object..js (module.js:410:10)
    at Module.load (module.js:336:31)
    at Function._load (module.js:297:12)
    at require (module.js:348:19)
    at Object.<anonymous> (/cygdrive/c/Users/username/Projekty/Externe/JS/AngularJS/0.10.3/docs/src/gen-docs.js:3:14)
rake aborted!
No such file or directory - build/docs/.htaccess
C:/Users/username/Projekty/Externe/JS/AngularJS/0.10.3/Rakefile:118:in `initialize'
C:/Users/username/Projekty/Externe/JS/AngularJS/0.10.3/Rakefile:118:in `open'
C:/Users/username/Projekty/Externe/JS/AngularJS/0.10.3/Rakefile:118:in `block in <top (required)>'

I'm very new to node.js so any help is really appreciated :-)

Igor Minar

unread,
Oct 17, 2011, 2:11:07 AM10/17/11
to ang...@googlegroups.com
qq is a npm package that we use when building angular.

For complete list of dependencies, please see: http://docs.angularjs.org/#!/misc/contribute

/i

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/P8tPBd4QjVgJ.

Ondrej Svačina

unread,
Oct 17, 2011, 2:09:01 PM10/17/11
to ang...@googlegroups.com
Unfortunately I'm out of luck now because npm is supported only on native Windows nodejs builds - this means at least 0.5.x. I tried to install npm with 0.4.x but it didn't work. I successfully installed npm with node 0.5.x and also installed three modules (q, qq, q-fs) but then angular's rake package has the aforementioned problem ("require.paths is removed"). Any plans to upgrade angularjs to node 0.5.x?

Vojta Jina

unread,
Oct 17, 2011, 6:52:54 PM10/17/11
to ang...@googlegroups.com
In node 0.5.* require.paths has been removed. Here is a pull request, with this fix, you can build angular on 0.5.* node as well...

V.

Igor Minar

unread,
Oct 19, 2011, 2:03:27 AM10/19/11
to ang...@googlegroups.com
landed in master: http://ci.angularjs.org/job/angular.js-angular-master/78/

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/HDa2P7uXJIcJ.

schooner

unread,
Jan 25, 2013, 7:12:56 PM1/25/13
to ang...@googlegroups.com
HI Folks,

I followed the directions at http://docs.angularjs.org/misc/contribute. When I run "rake package", it fails as shown below:

<initial output deleted>
Creating angular-scenario.js ...
rake aborted!
fork() function is unimplemented on this machine

I removed fork from Rakefile. Then I get the following output:

<initial output deleted>
Minifying angular-bootstrap-prettify.js ...
Error: Can't list "build\\docs\\css": ENOTDIR, readdir 'S:\git\Angular\angular.j
s\build\docs\css'
From previous event:
    at S:\git\Angular\angular.js\node_modules\q-fs\q-fs.js:135:20
    at retry (S:\git\Angular\angular.js\node_modules\q-fs\q-fs.js:31:35)
rake aborted!
symlink() function is unimplemented on this machine

I am very new to angular and javascript. I would really appreciate any help.

Pawel Kozlowski

unread,
Jan 26, 2013, 9:55:40 AM1/26/13
to ang...@googlegroups.com
Hi!

The bitter truth is that the current AngularJS build simply doesn't
work on Windows. On my side I kind of managed it to work by removing
fork (as you did) plus skipping docs generation. But yeh, those are
more like hacks...

So, you just need to be prepared to hack the rake build file if you
really must run it on Win.... In the distant future the build might
get switched to Grunt.js so the situation could get better... But for
this to happen Grunt.js needs to stabilize so this won't happen in the
near future.

Cheers,
Pawel
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to angular+u...@googlegroups.com.
> To post to this group, send email to ang...@googlegroups.com.
> Visit this group at http://groups.google.com/group/angular?hl=en-US.
>
>



--
Question? Send a fiddle
(http://jsfiddle.net/pkozlowski_opensource/Q2NpJ/) or a plunk
(http://plnkr.co/)
Need help with jsFiddle? Check this:
http://pkozlowskios.wordpress.com/2012/08/12/using-jsfiddle-with-angularjs/

Looking for UI widget library for AngularJS? Here you go:
http://angular-ui.github.com/

Jan Killian

unread,
Mar 11, 2013, 3:20:29 AM3/11/13
to ang...@googlegroups.com
Hi Chris, 

I put together instructions for both current grunt based build and previous rake based build in 1.1.3 and older: http://j.mp/ng-win

## Current grunt based build

1. Install grunt launcher.

        npm install -g grunt-cli

2. Run `grunt` as Administrator. That's needed to create directory symlinks using `mklink /d`.
    
        grunt

## Previous rake based build in 1.1.3 and older

1. Checkout the required version.

        git checkout 1.0.5  # or any other <=1.1.3

2. Patch `Rakefile` to use `mklink /d` for symlinks and to not use `fork`.
    Patch `docs/src/gen-docs.sh`+`writer.sh` to do symlinks correctly.
    The second part was taken from angular switch to grunt in commit

        curl -L http://j.mp/ng-rake-win-patch | patch -p 1 -f
        
3. Run `rake` as Administrator. That's needed to create directory symlinks using `mklink /d`.

        rake

4. Undo the changes before checking out master, or any other version. 

        git reset HEAD --hard

## Test if it works

1. `npm install -g http-server`
2. `start http-server build`

## Comments

or at the gist: http://j.mp/ng-win

Peter Bacon Darwin

unread,
Mar 11, 2013, 4:37:49 AM3/11/13
to ang...@googlegroups.com
The master and v1.0.x branches are now built with grunt and do work on Windows!


--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Clint Checketts

unread,
Mar 11, 2013, 10:51:04 AM3/11/13
to ang...@googlegroups.com
And thank you for making that change!

Kudos to Dave Geddes!

Olivier Clément

unread,
Mar 11, 2013, 11:38:52 AM3/11/13
to ang...@googlegroups.com
I like to install the (no-brainer) Heroku toolbar when on windows
It installs Python, Ruby and all things you need (facilitating Nodejs installs), plus give you ability to run common Bash commands and Bash Scripts

ls, rm, sh, etc all become available with that.

Then Git is a really simple install too, etc...
Reply all
Reply to author
Forward
0 new messages