infiniband-radar-web icon indicating copy to clipboard operation
infiniband-radar-web copied to clipboard

Node.js/npm error when building the client service

Open URZ-HD opened this issue 2 years ago • 2 comments

Hi, after a while i have to build a new container of the ibradar tools on our system. But this time the client service does not build successfully. It looks like an issue with a updated npm or ssl version ?

I'm building with docker-compose build --force-rm --no-cache to ignore local caches, etc

Building client
Step 1/16 : FROM node:alpine as builder
 ---> 9e17f47b0a78
Step 2/16 : RUN apk add --no-cache git
 ---> Running in 9d357018c19f
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
(1/7) Installing ca-certificates (20191127-r5)
(2/7) Installing brotli-libs (1.0.9-r5)
(3/7) Installing nghttp2-libs (1.43.0-r0)
(4/7) Installing libcurl (7.79.1-r0)
(5/7) Installing expat (2.4.1-r0)
(6/7) Installing pcre2 (10.36-r0)
(7/7) Installing git (2.32.0-r0)
Executing busybox-1.33.1-r6.trigger
Executing ca-certificates-20191127-r5.trigger
OK: 21 MiB in 23 packages
Removing intermediate container 9d357018c19f
 ---> 7ef4e6fc0e57
Step 3/16 : WORKDIR /app/client/
 ---> Running in 2612cd68ced4
Removing intermediate container 2612cd68ced4
 ---> 507658f8407e
Step 4/16 : COPY client/package.json client/package-lock.json /app/client/
 ---> 613feba56afb
Step 5/16 : COPY .git /app/
 ---> e227e42a6d19
Step 6/16 : RUN cd /app/client && npm set progress=false && npm install
 ---> Running in d64271bccc8f
npm WARN old lockfile 
npm WARN old lockfile The package-lock.json file was created with an old version of npm,                                                                                                     
npm WARN old lockfile so supplemental metadata must be fetched from the registry.                                                                                                            
npm WARN old lockfile                                                                                                                                                                        
npm WARN old lockfile This is a one-time fix-up, please be patient...                                                                                                                        
npm WARN old lockfile                                                                                                                                                                        
npm WARN old lockfile fork-ts-checker-webpack-plugin-v5: No matching version found for [email protected].                                                              
npm WARN old lockfile     at module.exports (/usr/local/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:209:23)                                                                 
npm WARN old lockfile     at /usr/local/lib/node_modules/npm/node_modules/pacote/lib/registry.js:118:26                                                                                      
npm WARN old lockfile     at async Array.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:741:9)                                  
npm WARN old lockfile  Could not fetch metadata for [email protected] fork-ts-checker-webpack-plugin-v5: No matching version found for [email protected].                                                                                                                                                                                     
npm WARN old lockfile     at module.exports (/usr/local/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:209:23)                                                                 
npm WARN old lockfile     at /usr/local/lib/node_modules/npm/node_modules/pacote/lib/registry.js:118:26                                                                                      
npm WARN old lockfile     at async Array.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:741:9) {                                
npm WARN old lockfile   code: 'ETARGET',                                                                                                                                                     
npm WARN old lockfile   type: 'version',                                                                                                                                                     
npm WARN old lockfile   wanted: '5.1.0',                                                                                                                                                     
npm WARN old lockfile   versions: [ '0.0.1-security' ],                                                                                                                                      
npm WARN old lockfile   distTags: { latest: '0.0.1-security' },                                                                                                                              
npm WARN old lockfile   defaultTag: 'latest'                                                                                                                                                 
npm WARN old lockfile }                                                                                                                                                                      
npm WARN old lockfile Error: Integrity checksum failed when using sha512: wanted sha512-ciWfzNefqWlmzKznCWY9hl+fPP4KlQ0A9MtHbJ/8DpyY+dAM8gDrjufIdxwTgC4szE4EZC3A6ip/BbrqM84GqA== but got sha512-A7QfSdpJ5aSJeqrENJ8a6LtLqAmQMkj68rnB9npI3Mq7ZPLJTAa2lhj0qLEo7TUJsuiLJqWBWBjAff1MgS2wCQ==.                                                                                                 
npm WARN old lockfile     at /usr/local/lib/node_modules/npm/node_modules/pacote/lib/registry.js:145:39                                                                                      
npm WARN old lockfile     at async Array.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:741:9)                                  
npm WARN old lockfile  Could not fetch metadata for [email protected] Error: Integrity checksum failed when using sha512: wanted sha512-ciWfzNefqWlmzKznCWY9hl+fPP4KlQ0A9MtHbJ/8DpyY+dAM8gDrjufIdxwTgC4szE4EZC3A6ip/BbrqM84GqA== but got sha512-A7QfSdpJ5aSJeqrENJ8a6LtLqAmQMkj68rnB9npI3Mq7ZPLJTAa2lhj0qLEo7TUJsuiLJqWBWBjAff1MgS2wCQ==.                                      
npm WARN old lockfile     at /usr/local/lib/node_modules/npm/node_modules/pacote/lib/registry.js:145:39                                                                                      
npm WARN old lockfile     at async Array.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:741:9) {                                
npm WARN old lockfile   code: 'EINTEGRITY'                                                                                                                                                   
npm WARN old lockfile }                                                                                                                                                                      
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated                                                                                                         
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.                                                                                                                                                               
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated                                                                                                      
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.                                                        
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142                                                                          
npm WARN deprecated [email protected]: this library is no longer supported                                                                                                                 
npm WARN deprecated [email protected]: 3.x is no longer supported                                                                                                                    
npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.                                                                                      
npm WARN deprecated [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.                                                                                                 
npm WARN deprecated @types/[email protected]: This is a stub types definition for Moment (https://github.com/moment/moment). Moment provides its own type definitions, so you don't need @types/moment installed!                                                                                                                                                                             
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained                                                                              
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained                                                                            
npm WARN deprecated @hapi/[email protected]: Moved to 'npm install @sideway/address'                                                                                                             
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained                                                                              
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)                                                                                                                                  
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.                                                                    
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.                                                                    
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)                                                                                                                                  
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)                                                                                                                                  
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)                                                                                                                                  
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)                                                                                                                                  
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)                                                                                                                                  
npm WARN deprecated @hapi/[email protected]: Switch to 'npm install joi'                                                                                                                            
npm WARN deprecated [email protected]: Version no longer supported. Upgrade to @latest                                                                                                     

added 1161 packages, and audited 1162 packages in 37s

59 packages are looking for funding
  run `npm fund` for details

45 vulnerabilities (24 moderate, 21 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.
npm notice 
npm notice New patch version of npm available! 8.1.2 -> 8.1.4                                                                                                                                
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.1.4>                                                                                                                       
npm notice Run `npm install -g [email protected]` to update!                                                                                                                                         
npm notice                                                                                                                                                                                   
Removing intermediate container d64271bccc8f
 ---> d95b2f7e313a
Step 7/16 : COPY common/ /app/common
 ---> dd0f05613a4b
Step 8/16 : RUN cd /app/common/3dparty/vis && npm install
 ---> Running in 44b2ac339baa
npm WARN old lockfile 
npm WARN old lockfile The package-lock.json file was created with an old version of npm,                                                                                                     
npm WARN old lockfile so supplemental metadata must be fetched from the registry.                                                                                                            
npm WARN old lockfile                                                                                                                                                                        
npm WARN old lockfile This is a one-time fix-up, please be patient...                                                                                                                        
npm WARN old lockfile                                                                                                                                                                        
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated                                                                                                         
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated                                                                                                      
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.                                                        
npm WARN deprecated [email protected]: Critical bug fixed in v3.0.1, please upgrade to the latest version.                                                                                     
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.                                                                                                                                                               
npm WARN deprecated [email protected]: This module relies on Node.js's internals and will break at some point. Do not use it, and update to [email protected].                                     
npm WARN deprecated [email protected]: Critical bug fixed in v2.0.1, please upgrade to the latest version.                                                                                    
npm WARN deprecated [email protected]: Please update to ini >=1.3.6 to avoid a prototype pollution issue                                                                                             
npm WARN deprecated [email protected]: this library is no longer supported                                                                                                                 
npm WARN deprecated [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5                                      
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142                                                                          
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)            
npm WARN deprecated [email protected]: Please use the native JSON object instead of JSON 3                                                                                                         
npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.                                                                                      
npm WARN deprecated [email protected]: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!                           
npm WARN deprecated [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.                                                               
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.                                                                    
npm WARN deprecated [email protected]: Critical bug fixed in v3.0.1, please upgrade to the latest version.                                                                                     
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js                                                        
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue                                                                                 
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js                                                         
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue                                                                                 
npm WARN deprecated [email protected]: This version of 'buffer' is out-of-date. You must update to v4.9.2 or newer                                                                                
npm WARN deprecated [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.                                         

added 704 packages, and audited 705 packages in 18s

49 vulnerabilities (4 low, 15 moderate, 17 high, 13 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
Removing intermediate container 44b2ac339baa
 ---> e0d0347e8e64
Step 9/16 : COPY client/ /app/client
 ---> 093cb46f47fa
Step 10/16 : RUN cd /app/client && npm run build
 ---> Running in ea4aa162dbd5

> [email protected] build
> vue-cli-service build


-  Building for production...
Starting type checking and linting service...
Using 1 worker with 2048MB memory limit
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:130:10)
    at module.exports (/app/client/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/app/client/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/app/client/node_modules/webpack/lib/NormalModule.js:471:10)
    at /app/client/node_modules/webpack/lib/NormalModule.js:503:5
    at /app/client/node_modules/webpack/lib/NormalModule.js:358:12
    at /app/client/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/app/client/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (/app/client/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
    at /app/client/node_modules/loader-runner/lib/LoaderRunner.js:236:3
    at runSyncOrAsync (/app/client/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
    at iterateNormalLoaders (/app/client/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
    at Array.<anonymous> (/app/client/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/app/client/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
    at /app/client/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
/app/client/node_modules/loader-runner/lib/LoaderRunner.js:114
                        throw e;
                        ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:130:10)
    at module.exports (/app/client/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/app/client/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/app/client/node_modules/webpack/lib/NormalModule.js:471:10)
    at /app/client/node_modules/webpack/lib/NormalModule.js:503:5
    at /app/client/node_modules/webpack/lib/NormalModule.js:358:12
    at /app/client/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/app/client/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (/app/client/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
    at /app/client/node_modules/loader-runner/lib/LoaderRunner.js:236:3
    at context.callback (/app/client/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at /app/client/node_modules/cache-loader/dist/index.js:147:7
    at /app/client/node_modules/graceful-fs/graceful-fs.js:61:14
    at FSReqCallback.oncomplete (node:fs:188:23) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v17.1.0
Removing intermediate container ea4aa162dbd5
ERROR: Service 'client' failed to build: The command '/bin/sh -c cd /app/client && npm run build' returned a non-zero code: 1

We have not changed anything in our config or environment. the used docker-compose.yml looks like:

version: "3.5"
services:
  gateway:
[...]
 client:
    image: 127.0.0.1:5000/ibradar_client
    build:
      context: .
      dockerfile: Dockerfile-client
    restart: unless-stopped
    expose:
      - "80"
    logging:
      driver: json-file
      options:
        max-size: "200k"
        max-file: "5"
    networks:
      - ibradar-net
  [...]

Is this a known problem ?

best, Sven

URZ-HD avatar Dec 01 '21 21:12 URZ-HD