mainflux/ui

make ui error

Closed this issue · 1 comments

make ui

docker build --tag=mainflux/ui -f docker/Dockerfile .
Sending build context to Docker daemon  3.444MB
Step 1/9 : FROM node:13.1.0 as node
 ---> a76ab9b9033f
Step 2/9 : WORKDIR /app
 ---> Using cache
 ---> 3c15a7b2169e
Step 3/9 : COPY package.json /app/
 ---> 5b2b0c6ae206
Step 4/9 : RUN npm install
 ---> Running in 56bbf21aadad
npm WARN deprecated core-js@2.5.1: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated ckeditor@4.12.1: We have renamed the @ckeditor package. New versions are available under the @ckeditor4 name.
npm WARN deprecated chokidar@1.7.0: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
^@npm WARN deprecated ts-simple-ast@12.4.0: NOTICE: ts-simple-ast has been renamed to ts-morph and version reset to 1.0.0. Switch at your leisure...
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated opn@6.0.0: The package has been renamed to `open`
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
^@npm WARN deprecated json3@3.3.2: Please use the native JSON object instead of JSON 3
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
^@^@
> husky@0.13.3 install /app/node_modules/husky
> node ./bin/install.js

husky
setting up hooks
Can't find .git directory, skipping Git hooks installation

> node-sass@4.14.1 install /app/node_modules/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.14.1/linux-x64-79_binding.node
Download complete
Binary saved to /app/node_modules/node-sass/vendor/linux-x64-79/binding.node
Caching binary to /root/.npm/node-sass/4.14.1/linux-x64-79_binding.node

> core-js@3.6.4 postinstall /app/node_modules/@angular-devkit/build-angular/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> @angular/cli@9.1.12 postinstall /app/node_modules/@angular/cli
> node ./bin/postinstall/script.js


> @compodoc/compodoc@1.1.11 postinstall /app/node_modules/@compodoc/compodoc
> opencollective-postinstall || exit 0

Thank you for using @compodoc/compodoc!
If you rely on this package, please consider supporting our open collective:
> https://opencollective.com/compodoc/donate


> @fortawesome/fontawesome-free@5.15.1 postinstall /app/node_modules/@fortawesome/fontawesome-free
> node attribution.js

Font Awesome Free 5.15.1 by @fontawesome - https://fontawesome.com
License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)


> ngx-mqtt@7.0.14 postinstall /app/node_modules/ngx-mqtt
> node postinstall


> node-sass@4.14.1 postinstall /app/node_modules/node-sass
> node scripts/build.js

Binary found at /app/node_modules/node-sass/vendor/linux-x64-79/binding.node
Testing binary
Binary is fine
npm WARN lifecycle ngx-admin@4.0.1~postinstall: cannot run in wd ngx-admin@4.0.1 ngcc --properties es2015 es5 browser module main --first-only --create-ivy-entry-points (wd=/app)
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN notsup Unsupported engine for karma@1.7.1: wanted: {"node":"0.10 || 0.12 || 4 || 5 || 6 || 7 || 8"} (current: {"node":"13.1.0","npm":"6.12.1"})
npm WARN notsup Not compatible with your version of node/npm: karma@1.7.1
npm WARN notsup Unsupported engine for karma-cli@1.0.1: wanted: {"node":"0.10 || 0.12 || 4 || 5 || 6"} (current: {"node":"13.1.0","npm":"6.12.1"})
npm WARN notsup Not compatible with your version of node/npm: karma-cli@1.0.1
npm WARN notsup Unsupported engine for browserslist@4.14.5: wanted: {"node":"^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"} (current: {"node":"13.1.0","npm":"6.12.1"})
npm WARN notsup Not compatible with your version of node/npm: browserslist@4.14.5
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/rollup/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN notsup Unsupported engine for watchpack-chokidar2@2.0.0: wanted: {"node":"<8.10.0"} (current: {"node":"13.1.0","npm":"6.12.1"})
npm WARN notsup Not compatible with your version of node/npm: watchpack-chokidar2@2.0.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/webpack-dev-server/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/live-server/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/karma/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN bootstrap@4.3.1 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
npm WARN bootstrap@4.3.1 requires a peer of popper.js@^1.14.7 but none is installed. You must install peer dependencies yourself.
npm WARN ng2-ckeditor@1.2.9 requires a peer of @angular/core@^10.0.4 but none is installed. You must install peer dependencies yourself.
npm WARN ng2-ckeditor@1.2.9 requires a peer of @angular/forms@^10.0.4 but none is installed. You must install peer dependencies yourself.
npm WARN ng2-ckeditor@1.2.9 requires a peer of @angular/common@^10.0.4 but none is installed. You must install peer dependencies yourself.
npm WARN ng2-smart-table@1.7.0 requires a peer of ng2-completer@^9.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ng2-smart-table@1.7.0 requires a peer of @angular/common@^10.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ng2-smart-table@1.7.0 requires a peer of @angular/core@^10.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ng2-smart-table@1.7.0 requires a peer of @angular/forms@^10.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.3.1 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.3.1 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN @angular-devkit/build-angular@0.1001.7 requires a peer of @angular/compiler-cli@^10.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular-devkit/build-angular@0.1001.7 requires a peer of @angular/localize@^10.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular-devkit/build-angular@0.1001.7 requires a peer of ng-packagr@^10.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular-devkit/build-angular@0.1001.7 requires a peer of typescript@>=3.9 < 4.1 but none is installed. You must install peer dependencies yourself.
npm WARN tslint-language-service@0.9.9 requires a peer of typescript@>= 2.3.1 < 3 but none is installed. You must install peer dependencies yourself.
npm WARN @ngtools/webpack@10.1.7 requires a peer of @angular/compiler-cli@^10.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ngtools/webpack@10.1.7 requires a peer of typescript@>=3.9 < 4.1 but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader@10.0.1 requires a peer of fibers@>= 3.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-subresource-integrity@1.4.1 requires a peer of html-webpack-plugin@^2.21.0 || ~3 || >=4.0.0-alpha.2 <5 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-admin@4.0.1 No description

added 2264 packages from 1354 contributors and audited 2273 packages in 139.14s
found 28 vulnerabilities (15 low, 13 high)
  run `npm audit fix` to fix them, or `npm audit` for details
^@Removing intermediate container 56bbf21aadad
 ---> d7943ea0141a
Step 5/9 : COPY ./ /app/
 ---> cded58beac67
Step 6/9 : RUN npm run build -- --prod --aot
 ---> Running in c72d982a312d

> ngx-admin@4.0.1 build /app
> ng build "--prod" "--aot"

An unhandled exception occurred: Package exports for '/app/node_modules/terser' do not define a valid './package.json' target
See "/tmp/ng-VuvWId/angular-errors.log" for further details.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! ngx-admin@4.0.1 build: `ng build "--prod" "--aot"`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the ngx-admin@4.0.1 build 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/2020-10-21T04_02_03_941Z-debug.log
The command '/bin/sh -c npm run build -- --prod --aot' returned a non-zero code: 1
make: *** [ui] Error 1

@zsy-cn Thank you, something was wrong with the Node.js version used to install packages in the docker container. I'm not sure why but updating the Node.js version fix the problem.