# Bucklescript 5.0 released

**URL:** <https://discuss.ocaml.org/t/bucklescript-5-0-released/3540>\
**Category:** Community\
**Tags:** bucklescript\
**Created:** [March 21, 2019, 5:21am UTC](https://discuss.ocaml.org/t/bucklescript-5-0-released/3540 "2019-03-21T05:21:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobzhang](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/bobzhang/32/553_2.png) [@bobzhang](https://discuss.ocaml.org/u/bobzhang)\
**Post date:** [March 21, 2019, 5:21am UTC](https://discuss.ocaml.org/t/bucklescript-5-0-released/3540/1 "2019-03-21T05:21:21Z")

</div>

See [https://bucklescript.github.io/blog/](https://bucklescript.github.io/blog/) for more details.  
The cool thing is that you can try it out within 20s everywhere using cloud service like [https://c9.io/](https://c9.io/)  
`npm i -g bs-platform && bsb -init test && cd test && bsb`

---

<div class="post-metadata">

**Author:** ![yawaramin](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/yawaramin/32/3384_2.png) [@yawaramin](https://discuss.ocaml.org/u/yawaramin)\
**Post date:** [March 22, 2019, 6:46pm UTC](https://discuss.ocaml.org/t/bucklescript-5-0-released/3540/2 "2019-03-22T18:46:12Z")

</div>

The headline here is that Linux, Windows and Mac binaries are pre-built now, so installs should be really quick! This will particularly speed up CI builds.

---

<div class="post-metadata">

**Author:** ![jbulow](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/jbulow/32/644_2.png) [@jbulow](https://discuss.ocaml.org/u/jbulow)\
**Post date:** [March 28, 2019, 12:07pm UTC](https://discuss.ocaml.org/t/bucklescript-5-0-released/3540/3 "2019-03-28T12:07:57Z")

</div>

> [@bobzhang](#):
>
> npm i -g bs-platform && bsb -init test && cd test && bsb

Does not even install:

sudo npm i -g bs-platform  
/usr/bin/bsb → /usr/lib/node\_modules/bs-platform/lib/bsb  
/usr/bin/bsrefmt → /usr/lib/node\_modules/bs-platform/lib/bsrefmt  
/usr/bin/bsc → /usr/lib/node\_modules/bs-platform/lib/bsc

> bs-platform@5.0.0 postinstall /usr/lib/node\_modules/bs-platform  
> node scripts/install.js

fs.js:114  
throw err;  
^

Error: EACCES: permission denied, copyfile ‘/usr/lib/node\_modules/bs-platform/vendor/ninja/snapshot/ninja.linux’ → ‘/usr/lib/node\_modules/bs-platform/lib/ninja.exe’  
at Object.copyFileSync (fs.js:1723:3)  
at provideNinja (/usr/lib/node\_modules/bs-platform/scripts/install.js:85:16)  
at Object. (/usr/lib/node\_modules/bs-platform/scripts/install.js:263:1)  
at Module.\_compile (internal/modules/cjs/loader.js:701:30)  
at Object.Module.\_extensions…js (internal/modules/cjs/loader.js:712:10)  
at Module.load (internal/modules/cjs/loader.js:600:32)  
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)  
at Function.Module.\_load (internal/modules/cjs/loader.js:531:3)  
at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)  
at startup (internal/bootstrap/node.js:283:19)  
npm ERR! code ELIFECYCLE  
npm ERR! errno 1  
npm ERR! bs-platform@5.0.0 postinstall: `node scripts/install.js`  
npm ERR! Exit status 1  
npm ERR!  
npm ERR! Failed at the bs-platform@5.0.0 postinstall script.  
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

---

<div class="post-metadata">

**Author:** ![bobzhang](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/bobzhang/32/553_2.png) [@bobzhang](https://discuss.ocaml.org/u/bobzhang)\
**Post date:** [March 28, 2019, 12:32pm UTC](https://discuss.ocaml.org/t/bucklescript-5-0-released/3540/4 "2019-03-28T12:32:46Z")

</div>

can you try `sudo npm i -g --unsafe-perm bs-platform`

---

<div class="post-metadata">

**Author:** ![yawaramin](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/yawaramin/32/3384_2.png) [@yawaramin](https://discuss.ocaml.org/u/yawaramin)\
**Post date:** [March 28, 2019, 1:54pm UTC](https://discuss.ocaml.org/t/bucklescript-5-0-released/3540/5 "2019-03-28T13:54:15Z")

</div>

Assuming you’re using a personal computer, you should just take ownership of that directory hierarchy:

```
$ sudo chown -R jbulow /usr/lib/node_modules

```

Then global install should work:

```
$ npm install --global bs-platform
```

---

<div class="post-metadata">

**Author:** ![jbulow](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/jbulow/32/644_2.png) [@jbulow](https://discuss.ocaml.org/u/jbulow)\
**Post date:** [March 28, 2019, 2:02pm UTC](https://discuss.ocaml.org/t/bucklescript-5-0-released/3540/6 "2019-03-28T14:02:25Z")

</div>

Thanks, --unsafe-perm fixed the problem.

---

<div class="post-metadata">

**Author:** ![thangngoc89](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/thangngoc89/32/673_2.png) [@thangngoc89](https://discuss.ocaml.org/u/thangngoc89)\
**Post date:** [March 28, 2019, 3:33pm UTC](https://discuss.ocaml.org/t/bucklescript-5-0-released/3540/7 "2019-03-28T15:33:40Z")

</div>

This is not a problem with bucklescript but rather npm. There is a section in npm’s documentation to fix this error  
[https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally)

---

<div class="post-metadata">

**Author:** ![yawaramin](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/yawaramin/32/3384_2.png) [@yawaramin](https://discuss.ocaml.org/u/yawaramin)\
**Post date:** [March 28, 2019, 6:20pm UTC](https://discuss.ocaml.org/t/bucklescript-5-0-released/3540/8 "2019-03-28T18:20:27Z")

</div>

I was going to suggest adding a note to the docs, but looks like it’s already there: [https://bucklescript.github.io/docs/en/installation#permission-denied-errors](https://bucklescript.github.io/docs/en/installation#permission-denied-errors)
