Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to install BuckleScript on Windows & WSL #3855

Closed
mishaszu opened this issue Sep 27, 2019 · 3 comments
Closed

Failed to install BuckleScript on Windows & WSL #3855

mishaszu opened this issue Sep 27, 2019 · 3 comments
Labels
stale Old issues that went stale

Comments

@mishaszu
Copy link

Description

I am not able to install bs-platform on WSL (Ubuntu) either on Windows itself.

  1. On Windows git bash I am getting:
$ npm install -g bs-platform
npm ERR! code ERR_INVALID_OPT_VALUE
npm ERR! The value "false" is invalid for option "readableHighWaterMark"

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\misha\AppData\Roaming\npm-cache\_logs\2019-09-27T19_37_33_766Z-debug.log
  1. On WSL I am getting (the same for changed npm installation folder):
/usr/local/node-v10.16.3-linux-x64/bin/bsb -> /usr/local/node-v10.16.3-linux-x64/lib/node_modules/bs-platform/lib/bsb
/usr/local/node-v10.16.3-linux-x64/bin/bsrefmt -> /usr/local/node-v10.16.3-linux-x64/lib/node_modules/bs-platform/lib/bsrefmt
/usr/local/node-v10.16.3-linux-x64/bin/bsc -> /usr/local/node-v10.16.3-linux-x64/lib/node_modules/bs-platform/lib/bsc

> bs-platform@5.0.6 postinstall /usr/local/node-v10.16.3-linux-x64/lib/node_modules/bs-platform
> node scripts/install.js

fs.js:114
    throw err;
    ^

Error: EACCES: permission denied, copyfile '/usr/local/node-v10.16.3-linux-x64/lib/node_modules/bs-platform/vendor/ninja/snapshot/ninja.linux' -> '/usr/local/node-v10.16.3-linux-x64/lib/node_modules/bs-platform/lib/ninja.exe'
    at Object.copyFileSync (fs.js:1728:3)
    at provideNinja (/usr/local/node-v10.16.3-linux-x64/lib/node_modules/bs-platform/scripts/install.js:89:16)
    at Object.<anonymous> (/usr/local/node-v10.16.3-linux-x64/lib/node_modules/bs-platform/scripts/install.js:334:1)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bs-platform@5.0.6 postinstall: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bs-platform@5.0.6 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/mishaszu/.npm/_logs/2019-09-27T19_39_56_271Z-debug.log

Environment

Windows 10

  • node -v -> 10.16.3
  • npm -v -> 6.9.0
    WSL on Windows 10 (build-essential installed)
  • node -v -> 10.16.3
  • npm -v -> 6.9.0

Note

I've already looked into:
Already installed build-essential
and in my case I can't install any version on computer with antivirus
I am able to install bsb on Windows machine without antivirus and I use Windows installed app on WSL, version 5.0.6, but it seems like I am not able install it on bs-platform on WSL directly.

Also it seems like npx audit found some vulnerabilities when I tried to clone and install the repo.

@bobzhang
Copy link
Member

bobzhang commented Sep 30, 2019

The value "false" is invalid for option "readableHighWaterMark"

This error message seems coming from npm, I tested installation on CMD.exe and powershell, can you try it there

On WSL, by reading the log, it seems that you need npm i --unsafe-perm to get the permission, note we are working with false alarm of antivirus issue.

Note bs-platform does not have any dependency, it only has dev dependency, I will do a clean up to remove those warnings, thanks for the reminder

Edit: what's the proper way of running npx audit?

bucklescript>npx audit
Usage: audit -e | -i | -n | -s | -t

@mishaszu
Copy link
Author

mishaszu commented Oct 1, 2019

Alright, it seems like --unsafe-perm did the job. That's interesting because installation without the flag actually created bin files, and bsb worked but there was a problem with merlin server.

Now I am getting:

.npm-global/bin/ocamlmerlin-reason: 1: /home/misha-think/.npm-global/bin/ocamlmerlin-reason: Syntax error: word unexpected (expecting ")")

and

ocamlmerlin error: sh: 1: Syntax error: Unterminated quoted string

from vs-code, but thats probably should be proceed here

Sorry, the command is npm audit and npm audit fix should solve the problem. It should be run from the project directory root.

@stale
Copy link

stale bot commented Sep 20, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Old issues that went stale label Sep 20, 2021
@stale stale bot closed this as completed Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Old issues that went stale
Projects
None yet
Development

No branches or pull requests

2 participants