Installing bs-platform to a USB drive


This is the weird question of the day – is there a way to install the Windows version of bs-platform (and node/npm) to a USB drive so I can take it with me anywhere? I don’t have admin access to the computers where I work.


I would guess there are hardcoded paths in the binary that might be troublesome, but you should definitely try!


OK, this is ugly, but it seems to work:

  1. Download the .ZIP file of node and unzip it into directory c:\users\yourname (change the directory name to node-v12 for ease of typing later on)
  2. set PATH=%PATH%;c:\users\yourname\node-v12
  3. npm install bs-platform
  4. set PATH=%PATH%;c:\users\yourname\node_modules\bs-platform\lib
  5. bsb -init testing -theme basic-reason
  6. cd testing
  7. bsb -make-world
  8. node src\

Everything should work fine. Now copy the node_modules and node_v12 directories to the USB.
Go to another machine. Copy the directories back to c:\users\othername and set the PATH:

set PATH=%PATH%;c:\users\othername\node-v12;c:\users\othername\node_modules\bs-platform\lib

and that should work as well.


I don’t use a globally installed bs-platform anymore, having a separate copy per project is a little bloated but now that we have precompiled OCaml binaries it installs so fast that I usually don’t notice.


Hi, this looks a valid use case (in particular for windows users), let me know (on github issues) if we can make your life easier on windows


This was a one-time thing I was experimenting with (was going to give a short class on ReasonML in a classroom filled with Windows machines to which I don’t have admin access).

Most of the time I’m using Linux.