添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Below, the error when I execute npm run dist .

0 info it worked if it ends with ok                                                                                                                          
1 verbose cli [                                                                                                                                              
1 verbose cli   '/home/ap/.nvm/versions/node/v12.18.3/bin/node',                                                                                             
1 verbose cli   '/home/ap/.nvm/versions/node/v12.18.3/bin/npm',                                                                                              
1 verbose cli   'run',                                                                                                                                       
1 verbose cli   'dist'                                                                                                                                       
1 verbose cli ]                                                                                                                                              
2 info using [email protected]                                                                                                                                      
3 info using [email protected]                                                                                                                                   
4 verbose run-script [ 'predist', 'dist', 'postdist' ]                                                                                                       
5 info lifecycle [email protected]~predist: [email protected]                                                                                          
6 info lifecycle [email protected]~dist: [email protected]                                                                                             
7 verbose lifecycle [email protected]~dist: unsafe-perm in lifecycle true                                                                                 
8 verbose lifecycle [email protected]~dist: PATH: /home/ap/.nvm/versions/node/v12.18.3/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ap/vault/node_modules/.bin:/home/ap/.nvm/versions/node/v12.18.3/bin:/home/ap/.cargo/bin:/home/ap/.cargo/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/ap/.local/bin:/home/ap/bin                                                                                                                            
9 verbose lifecycle [email protected]~dist: CWD: /home/ap/vault                                                                                           
10 silly lifecycle [email protected]~dist: Args: [ '-c', 'npm run build:prod && gulp postdist' ]                                                          
11 silly lifecycle [email protected]~dist: Returned: code: 1  signal: null                                                                                
12 info lifecycle [email protected]~dist: Failed to exec dist script                                                                                      
13 verbose stack Error: [email protected] dist: `npm run build:prod && gulp postdist`                                                                     
13 verbose stack Exit status 1                                                                                                                               
13 verbose stack     at EventEmitter.<anonymous> (/home/ap/.nvm/versions/node/v12.18.3/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)      
13 verbose stack     at EventEmitter.emit (events.js:315:20)                                                                                                 
13 verbose stack     at ChildProcess.<anonymous> (/home/ap/.nvm/versions/node/v12.18.3/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)   
13 verbose stack     at ChildProcess.emit (events.js:315:20)                                                                                                 
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)                                                                                       
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)                                                                
14 verbose pkgid [email protected]                                                                                                                        
15 verbose cwd /home/ap/vault                                                                                                                                
16 verbose Linux 3.10.0-1127.el7.x86_64                                                                                                                      
17 verbose argv "/home/ap/.nvm/versions/node/v12.18.3/bin/node" "/home/ap/.nvm/versions/node/v12.18.3/bin/npm" "run" "dist"                                  
18 verbose node v12.18.3                                                                                                                                     
19 verbose npm  v6.14.6                                                                                                                                      
20 error code ELIFECYCLE                                                                                                                                     
21 error errno 1                                                                                                                                             
22 error [email protected] dist: `npm run build:prod && gulp postdist`                                                                                    
22 error Exit status 1                                                                                                                                       
23 error Failed at the [email protected] dist script.                                                                                                     
23 error This is probably not a problem with npm. There is likely additional logging output above.                                                           
24 verbose exit [ 1, true ]

What is going on?

In advance, thanks!

Make sure you run npm install to install all dependencies, and maybe try updating your node version. In the dockerfile we are using 13.8, lower versions might work but that’s the one we know working for sure.

It seems to randomly fail when running npm run build:prod && gulp postdist, can you try running that directly yourself and see if you get a more descriptive error?

The dockerfile for reference:
github.com

dani-garcia/bw_web_builds/blob/master/Dockerfile

# Compile the web vault using docker
# Usage:
#    docker build -t web_vault_build .
#    image_id=$(docker create web_vault_build)
#    docker cp $image_id:/bw_web_vault.tar.gz .
#    docker rm $image_id
#    Note: you can use --build-arg to specify the version to build:
#    docker build -t web_vault_build --build-arg VAULT_VERSION=master .
#    image_id=$(docker create bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c)
#    docker cp $image_id:/bw_web_vault.tar.gz .
#    docker rm $image_id
FROM node:13.8.0-stretch as build
# Prepare the folder to enable non-root, otherwise npm will refuse to run the postinstall
RUN mkdir /vault
RUN chown node:node /vault
USER node
  This file has been truncated. show original