ocaml-reason-wsl
ocaml-reason-wsl copied to clipboard
install fail, error:Cannot find module '/root/.npm-global/lib/node_modules/bs-platform/scripts/install.js'
PS C:\Users\yu> npm install -g ocaml-reason-wsl
[email protected] preinstall C:\Users\yu\AppData\Roaming\npm\node_modules\ocaml-reason-wsl bin\preinstall.bat
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB] Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB] Get:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB] Get:5 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [627 kB] Get:6 http://archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [252 kB] 0% [Working]
0% [Working] 0% [Working] Ign:7 https://deb.nodesource.com/node_8.x xenial InRelease 0% [Working] 0% [Working]
Ign:8 https://deb.nodesource.com/node_8.x xenial Release 99% [Working]
99% [Working] 99% [Working]
99% [Working] Ign:9 https://deb.nodesource.com/node_8.x xenial/main Sources.diff/Index 99% [Working] 99% [Working]
Ign:10 https://deb.nodesource.com/node_8.x xenial/main amd64 Packages.diff/Index Ign:11 https://deb.nodesource.com/node_8.x xenial/main all Packages 99% [Working] 99% [Working] 99% [Working] Ign:12 https://deb.nodesource.com/node_8.x xenial/main Translation-en_US 99% [Working] 99% [Working] 99% [Working] 99% [Working] Ign:13 https://deb.nodesource.com/node_8.x xenial/main Translation-en 99% [Working] 99% [Working] Ign:14 https://deb.nodesource.com/node_8.x xenial/main Sources Ign:15 https://deb.nodesource.com/node_8.x xenial/main amd64 Packages Ign:11 https://deb.nodesource.com/node_8.x xenial/main all Packages Ign:12 https://deb.nodesource.com/node_8.x xenial/main Translation-en_US Ign:13 https://deb.nodesource.com/node_8.x xenial/main Translation-en 99% [Working]
99% [Working] 99% [Working] Ign:14 https://deb.nodesource.com/node_8.x xenial/main Sources Ign:15 https://deb.nodesource.com/node_8.x xenial/main amd64 Packages Ign:11 https://deb.nodesource.com/node_8.x xenial/main all Packages Ign:12 https://deb.nodesource.com/node_8.x xenial/main Translation-en_US Ign:13 https://deb.nodesource.com/node_8.x xenial/main Translation-en Ign:14 https://deb.nodesource.com/node_8.x xenial/main Sources Ign:15 https://deb.nodesource.com/node_8.x xenial/main amd64 Packages Ign:11 https://deb.nodesource.com/node_8.x xenial/main all Packages Ign:12 https://deb.nodesource.com/node_8.x xenial/main Translation-en_US Ign:13 https://deb.nodesource.com/node_8.x xenial/main Translation-en Hit:14 https://deb.nodesource.com/node_8.x xenial/main Sources Hit:15 https://deb.nodesource.com/node_8.x xenial/main amd64 Packages Ign:11 https://deb.nodesource.com/node_8.x xenial/main all Packages Ign:12 https://deb.nodesource.com/node_8.x xenial/main Translation-en_US Ign:13 https://deb.nodesource.com/node_8.x xenial/main Translation-en Ign:11 https://deb.nodesource.com/node_8.x xenial/main all Packages Ign:12 https://deb.nodesource.com/node_8.x xenial/main Translation-en_US Ign:13 https://deb.nodesource.com/node_8.x xenial/main Translation-en Fetched 323 kB in 11min 42s (459 B/s) Reading package lists... Done W: The repository 'https://deb.nodesource.com/node_8.x xenial Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages were automatically installed and are no longer required: libfreetype6 libuv1 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Reading package lists... Done Building dependency tree Reading state information... Done m4 is already the newest version (1.4.17-5). ocaml-nox is already the newest version (4.02.3-5ubuntu2). opam is already the newest version (1.2.2-4). The following packages were automatically installed and are no longer required: libfreetype6 libuv1 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. [WARNING] Running as root is not recommended OPAM has already been initialized.User configuration: ~/.ocamlinit is already up-to-date. ~/.bashrc is already up-to-date. Global configuration: ~/.opam/opam-init/init.sh is already up-to-date. ~/.opam/opam-init/init.zsh is already up-to-date. ~/.opam/opam-init/init.csh is already up-to-date. ~/.opam/opam-init/init.fish is already up-to-date. [WARNING] Running as root is not recommended
=-=- Updating package repositories =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Processing 1/1: [default: http]
Processing 1/1: [default: http]
[default] synchronized from https://opam.ocaml.org
Updates available for 4.02.3, apply them with 'opam upgrade': ===== ↗ 1 ===== [WARNING] Running as root is not recommended [WARNING] Running as root is not recommended [NOTE] Package reason is already installed (current version is 3.0.4). [WARNING] Running as root is not recommended [NOTE] Package merlin is already installed (current version is 2.5.4).
Installing the NodeSource Node.js 8.x LTS Carbon repo...
Populating apt-get cache...
- apt-get update Hit:1 http://security.ubuntu.com/ubuntu xenial-security InRelease Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease Hit:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease Get:4 https://deb.nodesource.com/node_8.x xenial InRelease [4,646 B] Hit:5 http://archive.ubuntu.com/ubuntu xenial-backports InRelease Hit:6 https://deb.nodesource.com/node_8.x xenial/main Sources Hit:7 https://deb.nodesource.com/node_8.x xenial/main amd64 Packages Fetched 4,646 B in 9s (508 B/s) Reading package lists... Done
Confirming "xenial" is supported...
- curl -sLf -o /dev/null 'https://deb.nodesource.com/node_8.x/dists/xenial/Release'
Adding the NodeSource signing key to your keyring...
- curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - OK
Creating apt sources list file for the NodeSource Node.js 8.x LTS Carbon repo...
- echo 'deb https://deb.nodesource.com/node_8.x xenial main' > /etc/apt/sources.list.d/nodesource.list
- echo 'deb-src https://deb.nodesource.com/node_8.x xenial main' >> /etc/apt/sources.list.d/nodesource.list
Running apt-get update
for you...
- apt-get update Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease Hit:2 http://security.ubuntu.com/ubuntu xenial-security InRelease Hit:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease Hit:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease Hit:5 https://deb.nodesource.com/node_8.x xenial InRelease Reading package lists... Done
Run sudo apt-get install -y nodejs
to install Node.js 8.x LTS Carbon and npm
You may also need development tools to build native addons:
sudo apt-get install gcc g++ make
To install the Yarn package manager, run:
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
Reading package lists... Done Building dependency tree Reading state information... Done nodejs is already the newest version (8.11.1-1nodesource1). The following packages were automatically installed and are no longer required: libfreetype6 libuv1 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. /root/.npm-global/bin/bsb -> /root/.npm-global/lib/node_modules/bs-platform/lib/bsb /root/.npm-global/bin/bsrefmt -> /root/.npm-global/lib/node_modules/bs-platform/lib/bsrefmt /root/.npm-global/bin/bsc -> /root/.npm-global/lib/node_modules/bs-platform/lib/bsc
[email protected] postinstall /root/.npm-global/lib/node_modules/bs-platform node scripts/install.js
module.js:549 throw err; ^
Error: Cannot find module '/root/.npm-global/lib/node_modules/bs-platform/scripts/install.js'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: node scripts/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! /root/.npm/_logs/2018-05-14T13_39_04_608Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] preinstall: bin\preinstall.bat
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] preinstall 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! C:\Users\yu\AppData\Roaming\npm-cache_logs\2018-05-14T13_39_04_793Z-debug.log