Manual compile and install on Ubuntu 16 not working for vault #141

Closed
opened 2026-02-04 17:51:32 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @jfreak53 on GitHub (Nov 22, 2018).

I've run the manual compile and install using these instructions:
https://github.com/dani-garcia/bitwarden_rs/blob/master/BUILD.md

I make it up to the npm install, when I run that I get the following errors:

npm WARN lifecycle bitwarden-web@2.5.0~postinstall: cannot run in wd bitwarden-web@2.5.0 npm run sub:init (wd=/root/web-vault)
npm WARN bitwarden-web@2.5.0 No repository field.
npm WARN bitwarden-web@2.5.0 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 1269 packages from 696 contributors and audited 10926 packages in 211.207s
found 5 vulnerabilities (1 low, 4 high)
  run `npm audit fix` to fix them, or `npm audit` for details

So I run npm audit fix then npm run dist and I get these errors:

fs.js:25
'use strict';
^

ReferenceError: internalBinding is not defined
    at fs.js:25:1
    at req_ (/root/web-vault/node_modules/natives/index.js:137:5)
    at Object.req [as require] (/root/web-vault/node_modules/natives/index.js:54:10)
    at Object.<anonymous> (/root/web-vault/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js:1:99)
    at Module._compile (internal/modules/cjs/loader.js:722:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)
    at Module.require (internal/modules/cjs/loader.js:658:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bitwarden-web@2.5.0 build:prod: `gulp prebuild && cross-env NODE_ENV=production webpack`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bitwarden-web@2.5.0 build:prod 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-11-22T17_40_59_737Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bitwarden-web@2.5.0 dist: `npm run build:prod && gulp postdist`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bitwarden-web@2.5.0 dist 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-11-22T17_40_59_751Z-debug.log
Originally created by @jfreak53 on GitHub (Nov 22, 2018). I've run the manual compile and install using these instructions: https://github.com/dani-garcia/bitwarden_rs/blob/master/BUILD.md I make it up to the `npm install`, when I run that I get the following errors: ``` npm WARN lifecycle bitwarden-web@2.5.0~postinstall: cannot run in wd bitwarden-web@2.5.0 npm run sub:init (wd=/root/web-vault) npm WARN bitwarden-web@2.5.0 No repository field. npm WARN bitwarden-web@2.5.0 No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) added 1269 packages from 696 contributors and audited 10926 packages in 211.207s found 5 vulnerabilities (1 low, 4 high) run `npm audit fix` to fix them, or `npm audit` for details ``` So I run `npm audit fix` then `npm run dist` and I get these errors: ``` fs.js:25 'use strict'; ^ ReferenceError: internalBinding is not defined at fs.js:25:1 at req_ (/root/web-vault/node_modules/natives/index.js:137:5) at Object.req [as require] (/root/web-vault/node_modules/natives/index.js:54:10) at Object.<anonymous> (/root/web-vault/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js:1:99) at Module._compile (internal/modules/cjs/loader.js:722:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10) at Module.load (internal/modules/cjs/loader.js:620:32) at tryModuleLoad (internal/modules/cjs/loader.js:560:12) at Function.Module._load (internal/modules/cjs/loader.js:552:3) at Module.require (internal/modules/cjs/loader.js:658:17) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! bitwarden-web@2.5.0 build:prod: `gulp prebuild && cross-env NODE_ENV=production webpack` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the bitwarden-web@2.5.0 build:prod 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-11-22T17_40_59_737Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! bitwarden-web@2.5.0 dist: `npm run build:prod && gulp postdist` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the bitwarden-web@2.5.0 dist 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-11-22T17_40_59_751Z-debug.log ```
Author
Owner

@dani-garcia commented on GitHub (Nov 22, 2018):

What version of node are you using? The docker builds are done using version 8, and I'm currently using 8.12.0 locally, but I see that version 10 is now stable.

I tried running the npm audit fix command to see if that broke a dependency or something but it doesn't seem to do anything:

fixed 0 of 5 vulnerabilities in 10929 scanned packages
  1 package update for 5 vulns involved breaking changes
  (use `npm audit fix --force` to install breaking changes; or refer to `npm audit` for steps to fix these manually)

Running npm audit seems to imply that gulp needs to be updated to version 4, which is a breaking change from the version 3.9.1 that the web vault is using.

Anyway, this is probably something that should be mentioned upstream (https://github.com/bitwarden/web), as we basically use the code straight from there.

I'll be closing this, as I don't think this is caused by us.

Edit: Out of curiosity, I tried building the web vault v.2.5.0 with node version 10.13.0 LTS and followed the steps in the guide, adding the npm audit fix before the npm run build, and it builds fine for me

@dani-garcia commented on GitHub (Nov 22, 2018): What version of node are you using? The docker builds are done using version 8, and I'm currently using 8.12.0 locally, but I see that version 10 is now stable. I tried running the npm audit fix command to see if that broke a dependency or something but it doesn't seem to do anything: ``` fixed 0 of 5 vulnerabilities in 10929 scanned packages 1 package update for 5 vulns involved breaking changes (use `npm audit fix --force` to install breaking changes; or refer to `npm audit` for steps to fix these manually) ``` Running `npm audit` seems to imply that gulp needs to be updated to version 4, which is a breaking change from the version 3.9.1 that the web vault is using. Anyway, this is probably something that should be mentioned upstream (https://github.com/bitwarden/web), as we basically use the code straight from there. I'll be closing this, as I don't think this is caused by us. Edit: Out of curiosity, I tried building the web vault `v.2.5.0` with node version 10.13.0 LTS and followed the steps in the guide, adding the `npm audit fix` before the `npm run build`, and it builds fine for me
Author
Owner

@jfreak53 commented on GitHub (Nov 23, 2018):

For what it's worth, for those searching in the future, downgrading usinv nvm to node 8.12.0, let's me finish everything just fine. Thanks!

@jfreak53 commented on GitHub (Nov 23, 2018): For what it's worth, for those searching in the future, downgrading usinv `nvm` to node 8.12.0, let's me finish everything just fine. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#141