# Build It With Nitrogen Help

**URL:** <https://erlangforums.com/t/build-it-with-nitrogen-help/1338>\
**Category:** Nitrogen Forum\
**Tags:** nitrogen, nitrogen-questions, book-build-it-with-nitrogen\
**Created:** [April 23, 2022, 4:22am UTC](https://erlangforums.com/t/build-it-with-nitrogen-help/1338 "2022-04-23T04:22:14Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ookma-Kyi](https://erlangforums.com/user_avatar/erlangforums.com/ookma-kyi/32/1207_2.png) [@Ookma-Kyi](https://erlangforums.com/u/Ookma-Kyi)\
**Post date:** [April 23, 2022, 4:22am UTC](https://erlangforums.com/t/build-it-with-nitrogen-help/1338/1 "2022-04-23T04:22:14Z")

</div>

Hi, I am working through the [sample chapter](https://builditwith.com/download/buildit-free.pdf) and am stuck on the following instructions on page 11:

> …$ git clone git://github.com/nitrogen/nitrogen  
> …$ cd nitrogen  
> …/nitrogen$ make rel\_inets PROJECT=testproj

This is what happens when I attempt to do that:

> C:\Users\foobar\>e:  
> E:\>cd nitrogen  
> E:\nitrogen\>make rel\_inets PROJECT=testproj  
> make[1]: Entering directory ‘/e/nitrogen’  
> ./rebar get-deps  
> /usr/bin/env: ‘escript’: No such file or directory  
> make[1]: \*\*\* [Makefile:40: get-deps] Error 127  
> make[1]: Leaving directory ‘/e/nitrogen’  
> make: \*\*\* [Makefile:104: rel\_inets] Error 2

I am brand new to Erlang so I have no idea what it is talking about when it refers to

> escript

. any ideas?

---

<div class="post-metadata">

**Author:** ![lpil](https://erlangforums.com/user_avatar/erlangforums.com/lpil/32/222_2.png) [@lpil](https://erlangforums.com/u/lpil)\
**Post date:** [April 23, 2022, 10:16am UTC](https://erlangforums.com/t/build-it-with-nitrogen-help/1338/2 "2022-04-23T10:16:49Z")

</div>

Welcome @Ookma-Kyi !

`escript` is a program that comes with Erlang that allows you to run Erlang scripts.

It might be that the makefile provided by Nitrogen there does not work on Windows. I’m not super familiar with Windows scripting but that path in the error message doesn’t look correct to me.

---

<div class="post-metadata">

**Author:** ![lgmfred](https://erlangforums.com/user_avatar/erlangforums.com/lgmfred/32/1359_2.png) [@lgmfred](https://erlangforums.com/u/lgmfred)\
**Post date:** [April 23, 2022, 10:17am UTC](https://erlangforums.com/t/build-it-with-nitrogen-help/1338/3 "2022-04-23T10:17:06Z")

</div>

Firstly, I hope you have erlang installed on your system. Secondly, if erlang is installed, then, it seems the erlang `escript` is not in the `$PATH` environment variable. From the snipped you have shared you seem to be using windows and I’m not sure about setting the environment variable but have a look at [this](https://stackoverflow.com/a/8462982/8628370) please.

---

<div class="post-metadata">

**Author:** ![Ookma-Kyi](https://erlangforums.com/user_avatar/erlangforums.com/ookma-kyi/32/1207_2.png) [@Ookma-Kyi](https://erlangforums.com/u/Ookma-Kyi)\
**Post date:** [April 23, 2022, 5:54pm UTC](https://erlangforums.com/t/build-it-with-nitrogen-help/1338/4 "2022-04-23T17:54:46Z")

</div>

I added the escript directory to the path and it seemed to be going well at first, but sadly it failed in the end:

> E:\nitrogen\>make rel\_inets PROJECT=testproj  
> make[1]: Entering directory ‘/e/nitrogen’  
> ./rebar get-deps  
> ==\> rel (get-deps)  
> ==\> nitrogen (get-deps)  
> ./rebar compile  
> ==\> rel (compile)  
> ==\> nitrogen (compile)  
> make[2]: Entering directory ‘/e/nitrogen’  
> make[2]: Leaving directory ‘/e/nitrogen’
> 
> * * *
> 
> Creating full release in …/testproj with inets
> 
> * * *
> 
> make[2]: Entering directory ‘/e/nitrogen’  
> make[3]: Entering directory ‘/e/nitrogen’  
> ==\> rel (generate)  
> Copying e:/Program Files/erl-23.0/lib/erl\_interface-4.0  
> Generating “nitrogen/rebar.config”  
> make[4]: Entering directory ‘/e/nitrogen/rel/nitrogen’  
> Using Erlang in /e/nitrogen/rel/nitrogen/erts-11.0/bin/erl  
> {“init terminating in do\_boot”,{‘cannot get bootfile’,‘no\_dot\_erlang.boot’}}  
> init terminating in do\_boot ({cannot get bootfile,no\_dot\_erlang.boot})
> 
> Crash dump is being written to: erl\_crash.dump…done  
> make[4]: \*\*\* [Makefile:15: get-deps] Error 1  
> make[4]: Leaving directory ‘/e/nitrogen/rel/nitrogen’  
> make[4]: Entering directory ‘/e/nitrogen/rel/nitrogen’  
> Generating a default cookie in /etc/vm.args  
> make[4]: Leaving directory ‘/e/nitrogen/rel/nitrogen’  
> make[4]: Entering directory ‘/e/nitrogen/rel/nitrogen’  
> cp: cannot stat ‘lib/nitrogen\_core/www/\*’: No such file or directory  
> make[4]: \*\*\* [Makefile:28: copy-static] Error 1  
> make[4]: Leaving directory ‘/e/nitrogen/rel/nitrogen’  
> make[3]: \*\*\* [Makefile:314: rel\_inner] Error 2  
> make[3]: Leaving directory ‘/e/nitrogen’  
> make[2]: \*\*\* [Makefile:325: rel\_inner\_full] Error 2  
> make[2]: Leaving directory ‘/e/nitrogen’  
> make[1]: \*\*\* [Makefile:214: rel] Error 2  
> make[1]: Leaving directory ‘/e/nitrogen’  
> make: \*\*\* [Makefile:104: rel\_inets] Error 2

Any ideas, very confused about what all this means…

---

<div class="post-metadata">

**Author:** ![lgmfred](https://erlangforums.com/user_avatar/erlangforums.com/lgmfred/32/1359_2.png) [@lgmfred](https://erlangforums.com/u/lgmfred)\
**Post date:** [April 23, 2022, 7:31pm UTC](https://erlangforums.com/t/build-it-with-nitrogen-help/1338/5 "2022-04-23T19:31:32Z")

</div>

**Please note that Windows support in nitrogen is experimental.**

And I do hope you were following [this](https://github.com/nitrogen/nitrogen/blob/master/rel/overlay/win/README.md) guide. Please try to follow the guide & if things fail again, just download the precompiled/packaged binary for Windows directly from [here](https://nitrogenproject.com/downloads).

---

<div class="post-metadata">

**Author:** ![gumm](https://erlangforums.com/user_avatar/erlangforums.com/gumm/32/688_2.png) [@gumm](https://erlangforums.com/u/gumm)\
**Post date:** [April 24, 2022, 1:30am UTC](https://erlangforums.com/t/build-it-with-nitrogen-help/1338/7 "2022-04-24T01:30:45Z")

</div>

Hi @Ookma-Kyi!

I very much appreciate you going through our book! That’s wonderful to hear. But I’m sorry you’re running into issues here.

Indeed, as @lgmfred pointed out, Windows support in Nitrogen is experimental. That’s not to say it doesn’t work in windows (it does), but the build process is a bit tedious and, in my experience, rather fragile.

Generally speaking, the main takeaway from the windows guide (that @lgmfred so kindly linked) is that building Nitrogen projects initially tends to work better (at all?) when it’s being used in an msys (or git for windows) bash environment.

The latest can be gotten from [gitforwindows.org](http://gitforwindows.org).

Once installed (and you have Erlang installed), the `make` commands should work.

Then, once the release is built, you can usually get away with starting the dev environment with the provided `start.cmd` file. Then to enable the dev/hot code reloading, just make sure you run `sync:go()` in the erlang shell.

This will work for a good long while until you need to add rebar dependencies, then you’ll likely want to run `make` in your project from your msys environment again.

That said, all the examples in Build it with Nitrogen assume a Linux or Unix environment. We should probably include a line warning the user that running the book from Windows can be a bit more challenging.

If you’re comfortable slinging the msys/git-for-windows environment, then by all means, have at 'er (I find that environment challenging myself), or if you’re comfortable using linux subsystem for windows (or whatever it’s called), that could probably work (never really gave it much a try myself).

But I’d much rather myself spin up a Linux VM in VirtualBox and do everything from that or a remote shell than try wrastlin’ with Windows.

---

<div class="post-metadata">

**Author:** ![Ookma-Kyi](https://erlangforums.com/user_avatar/erlangforums.com/ookma-kyi/32/1207_2.png) [@Ookma-Kyi](https://erlangforums.com/u/Ookma-Kyi)\
**Post date:** [April 24, 2022, 3:12am UTC](https://erlangforums.com/t/build-it-with-nitrogen-help/1338/8 "2022-04-24T03:12:00Z")

</div>

Thanks, I’m hoping to win the book, so I am reading the sample chapters meanwhile. The main takeaway I am getting is, like you said, the book is centered mainly around Linux users with not even a mention of Windows users. However, I am persistent and my willingness to learn so far outweighs the issues I have so far.

> We should probably include a line warning the user that running the book from Windows can be a bit more challenging.

I think this is a good idea and a very first step for Windows users like myself. I also highly suggest linking to the guide @lgmfred linked to since I managed to get it working using that or even this thread as it contains some very helpful tips and tricks for getting started on Windows.

Quick question though if I have Git SDK for Windows installed, do I still need Git?

---

<div class="post-metadata">

**Author:** ![gumm](https://erlangforums.com/user_avatar/erlangforums.com/gumm/32/688_2.png) [@gumm](https://erlangforums.com/u/gumm)\
**Post date:** [April 24, 2022, 1:52pm UTC](https://erlangforums.com/t/build-it-with-nitrogen-help/1338/9 "2022-04-24T13:52:24Z")

</div>

> [@Ookma-Kyi](#):
>
> Quick question though if I have Git SDK for Windows installed, do I still need Git?

No, Git for Windows should include the git installation.

I will also say that the upcoming version of Nitrogen, updated to use rebar3, does handle Windows development a little better. Still not great, but it’s less of a hack than Nitrogen 2’s Windows support.

---

<div class="post-metadata">

**Author:** ![Ookma-Kyi](https://erlangforums.com/user_avatar/erlangforums.com/ookma-kyi/32/1207_2.png) [@Ookma-Kyi](https://erlangforums.com/u/Ookma-Kyi)\
**Post date:** [April 24, 2022, 2:23pm UTC](https://erlangforums.com/t/build-it-with-nitrogen-help/1338/10 "2022-04-24T14:23:40Z")

</div>

> [@gumm](#):
>
> I will also say that the upcoming version of Nitrogen, updated to use rebar3, does handle Windows development a little better. Still not great, but it’s less of a hack than Nitrogen 2’s Windows support.

Sorry i’m new to this, what is rebar?

---

<div class="post-metadata">

**Author:** ![gumm](https://erlangforums.com/user_avatar/erlangforums.com/gumm/32/688_2.png) [@gumm](https://erlangforums.com/u/gumm)\
**Post date:** [April 24, 2022, 8:02pm UTC](https://erlangforums.com/t/build-it-with-nitrogen-help/1338/11 "2022-04-24T20:02:41Z")

</div>

No problem. Rebar is the Erlang build tool (think npm but for Erlang, if that helps). The current version of Nitrogen still uses the deprecated [rebar2](https://github.com/rebar/rebar), while [rebar3](https://rebar3.readme.io/docs/getting-started) is the current version and Nitrogen support is _mostly_ done, but hasn’t been released yet, until I have all the little bells and whistles working properly for it (including maintaining backwards compatibility for the rebar2 installations of Nitrogen).

The current state of rebar3 work in Nitrogen is all available in the rebar3 branch of the various Nitrogen repositories (the main one being [GitHub - nitrogen/nitrogen at rebar3](https://github.com/nitrogen/nitrogen/tree/rebar3))

Hope that helps.
