Fresh installation fails
Hi, I wanted to give bsb-native a spin but can't install it on my machine, on a new project (empty package.json) I get the following error.
yarn add v1.22.4
warning package.json: No license field
info No lockfile found.
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/2] ⠂ bs-platform-native
error /home/clentfort/code/test/node_modules/bs-platform-native: Command failed.
Exit code: 1
Command: node scripts/install.js
Arguments:
Directory: /home/clentfort/code/test/node_modules/bs-platform-native
Output:
ninja binary is already cached and installed: /home/clentfort/code/test/node_modules/bs-platform-native/linux/ninja.exe
No working prebuilt buckleScript compiler
tar (child): ../vendor/ocaml.tar.gz: Funktion open fehlgeschlagen: Datei oder Verzeichnis nicht gefunden
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
child_process.js:650
throw err;
^
Error: Command failed: tar xzvf ../vendor/ocaml.tar.gz
at checkExecSyncError (child_process.js:611:11)
at Object.execSync (child_process.js:647:15)
at ensureOCamlExistsSync (/home/clentfort/code/test/node_modules/bs-platform-native/scripts/buildocaml.js:22:8)
at Object.getVersionPrefix (/home/clentfort/code/test/node_modules/bs-platform-native/scripts/buildocaml.js:43:3)
at provideCompiler (/home/clentfort/code/test/node_modules/bs-platform-native/scripts/install.js:179:44)
at Object.<anonymous> (/home/clentfort/code/test/node_modules/bs-platform-native/scripts/install.js:221:20)
at Module._compile (internal/modules/cjs/loader.js:1176:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
at Module.load (internal/modules/cjs/loader.js:1040:32)
at Function.Module._load (internal/modules/cjs/loader.js:929:14) {
status: 2,
signal: null,
output: [ null, null, null ],
pid: 294835,
stdout: null,
stderr: null
}
When I do an ls -l node_modules/bs-platform-native I see that there is no ocaml.tar.gz.
The version of bs-platform-native is 0.0.6 according to the package.json.
insgesamt 208K
-rw-r--r-- 1 clentfort clentfort 204K 17. Mai 13:37 ninja.tar.gz
-rw-r--r-- 1 clentfort clentfort 200 17. Mai 13:37 README.md
The same error appears when I'm trying to install version 5.0 or 5.1, version range ~4.0.0 installs without any error.
@clentfort Did you have bsb-native installed as well?
Hovering over the npm package in vscode yields:
bucklescript plugin to compile to bytecode/native Latest version: 0.0.12 https://github.com/bsansouci/bucklescript#readme
So I will take it from that that you have to install both bsb-native and bs-platform-native. The second helps the first. Never seen them not together. This is strictly anectdotal information I am sharing.
Here is a working repo, if that helps: rex-json-update
Sorry, I just noticed that I did not add the package that I wanted to install in the output. The above was generated by running yarn add bsb-native in a completely empty package.
Im on arch linux, output of uname -a is the following if that helps Linux Wintersun 5.6.13-arch1-1 #1 SMP PREEMPT Thu, 14 May 2020 06:52:53 +0000 x86_64 GNU/Linux