IBM-Blockchain-Identity / indy-ssivc-tutorial

A turnkey, Docker-based tutorial for help developers get acquainted with Self-Sovereign Identity and Verifiable Credentials.
Apache License 2.0
80 stars 73 forks source link

TheOrgBook ./manage.sh build fails #26

Closed vtech19 closed 5 years ago

vtech19 commented 5 years ago

TheOrgBook build failed, command executed as: $ cd TheOrgBook/docker $ ./manage.sh build Can somebody please help. Error trace

`chunk {inline} inline.bundle.js, inline.bundle.js.map (inline) 3.89 kB [entry] [rendered]
chunk {main} main.bundle.js, main.bundle.js.map (main) 147 kB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 222 kB [initial] [rendered]
chunk {styles} styles.bundle.js, styles.bundle.js.map (styles) 16.8 kB [initial] [rendered]
chunk {vendor} vendor.bundle.js, vendor.bundle.js.map (vendor) 3.12 MB [initial] [rendered]

ERROR in ./node_modules/localize-router-http-loader/src/http-loader.js
Module not found: Error: Can't resolve 'localize-router' in '/opt/app-root/src/node_modules/localize-router-http-loader/src'
ERROR in ./src/app/app.module.ts
Module not found: Error: Can't resolve 'localize-router' in '/opt/app-root/src/src/app'
ERROR in ./src/app/app.component.ts
Module not found: Error: Can't resolve 'localize-router' in '/opt/app-root/src/src/app'
ERROR in /opt/app-root/src/node_modules/localize-router-http-loader/src/http-loader.d.ts (1,56): Cannot find module 'localize-router'.
ERROR in /opt/app-root/src/src/app/app.component.ts (4,39): Cannot find module 'localize-router'.
ERROR in /opt/app-root/src/src/app/app.module.ts (10,78): Cannot find module 'localize-router'.
ERROR in Error: Error encountered resolving symbol values statically. Could not resolve localize-router relative to /opt/app-root/src/src/app/app.module.ts., resolving symbol AppModule in /opt/app-root/src/src/app/app.module.ts, resolving symbol AppModule in /opt/app-root/src/src/app/app.module.ts, resolving symbol AppModule in /opt/app-root/src/src/app/app.module.ts
    at Error (native)
    at syntaxError (/opt/app-root/src/node_modules/@angular/compiler/bundles/compiler.umd.js:1729:34)
    at simplifyInContext (/opt/app-root/src/node_modules/@angular/compiler/bundles/compiler.umd.js:24979:23)
    at StaticReflector.simplify (/opt/app-root/src/node_modules/@angular/compiler/bundles/compiler.umd.js:24991:13)
    at StaticReflector.annotations (/opt/app-root/src/node_modules/@angular/compiler/bundles/compiler.umd.js:24418:41)
    at _getNgModuleMetadata (/opt/app-root/src/node_modules/@angular/compiler-cli/src/ngtools_impl.js:138:31)
    at _extractLazyRoutesFromStaticModule (/opt/app-root/src/node_modules/@angular/compiler-cli/src/ngtools_impl.js:109:26)
    at Object.listLazyRoutesOfModule (/opt/app-root/src/node_modules/@angular/compiler-cli/src/ngtools_impl.js:53:22)
    at Function.NgTools_InternalApi_NG_2.listLazyRoutes (/opt/app-root/src/node_modules/@angular/compiler-cli/src/ngtools_api.js:91:39)
    at AotPlugin._getLazyRoutesFromNgtools (/opt/app-root/src/node_modules/@ngtools/webpack/src/plugin.js:240:66)
    at _donePromise.Promise.resolve.then.then.then.then.then (/opt/app-root/src/node_modules/@ngtools/webpack/src/plugin.js:493:24)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/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"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.2 (node_modules/watchpack/node_modules/chokidar/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"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.2 (node_modules/webpack-dev-server/node_modules/chokidar/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"})
npm WARN localize-router-http-loader@0.0.3 requires a peer of localize-router@>=1.0.0-alpha.1 but none was installed.
npm WARN localize-router@2.0.0-RC.2 requires a peer of @angular/core@>=6.0.0 but none was installed.
npm WARN localize-router@2.0.0-RC.2 requires a peer of @angular/common@>=6.0.0 but none was installed.
npm WARN localize-router@2.0.0-RC.2 requires a peer of @angular/router@>=6.0.0 but none was installed.
npm WARN localize-router@2.0.0-RC.2 requires a peer of rxjs@^6.0.0 but none was installed.
npm WARN localize-router@2.0.0-RC.2 requires a peer of @ngx-translate/core@>=10.0.0 but none was installed.
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none was installed.
npm ERR! Linux 4.15.0-43-generic
npm ERR! argv "/opt/rh/rh-nodejs6/root/usr/bin/node" "/opt/rh/rh-nodejs6/root/usr/bin/npm" "install"
npm ERR! node v6.11.3
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! tob-web@0.0.1 postinstall: `ng build --prod --base-href ${NG_BASE_HREF:-/} ${NG_BUILD_FLAGS:-} && cp dist/themes/_active/index.html dist/index.html`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the tob-web@0.0.1 postinstall script 'ng build --prod --base-href ${NG_BASE_HREF:-/} ${NG_BUILD_FLAGS:-} && cp dist/themes/_active/index.html dist/index.html'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the tob-web package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ng build --prod --base-href ${NG_BASE_HREF:-/} ${NG_BUILD_FLAGS:-}  && cp dist/themes/_active/index.html dist/index.html
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs tob-web
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls tob-web
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /opt/app-root/src/npm-debug.log
Build failed
ERROR: An error occurred: non-zero (13) exit code from centos/nodejs-6-centos7:6

`

vtech19 commented 5 years ago

My Docker version is 18.09.0, build 4d60db4 and I am using Ubuntu 16.04LTS

joaquimpedrooliveira commented 5 years ago

Mine is failing with message Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '/opt/app-root/src/src'.

Docker version Docker version 18.06.1-ce, build e68fc7a and SO Ubuntu 16.04LTS.

Complete log:

indy-ssivc-tutorial/TheOrgBook/docker (master) $ ./manage.sh build

Building nginx-runtime image ...
Sending build context to Docker daemon  18.94kB
Step 1/9 : FROM nginx:mainline
 ---> 568c4670fa80
Step 2/9 : RUN apt-get update && apt-get install openssl
 ---> Using cache
 ---> 41e17ec64ca2
Step 3/9 : COPY ./s2i/bin/ /usr/libexec/s2i/
 ---> Using cache
 ---> 78cb49d41711
Step 4/9 : LABEL io.openshift.s2i.scripts-url=image:///usr/libexec/s2i
 ---> Using cache
 ---> 39a150476db7
Step 5/9 : COPY nginx.conf.template /tmp/
 ---> Using cache
 ---> 9fde7a96a577
Step 6/9 : RUN chmod -R 0777 /tmp /var /run /etc /mnt /usr/libexec/s2i/
 ---> Using cache
 ---> 9d7313d2c2cd
Step 7/9 : WORKDIR /tmp
 ---> Using cache
 ---> bad586b97582
Step 8/9 : EXPOSE 8080
 ---> Using cache
 ---> a48260cb7858
Step 9/9 : USER 104
 ---> Using cache
 ---> eef2bd978b2c
Successfully built eef2bd978b2c
Successfully tagged nginx-runtime:latest

Building angular-app image ...
---> Installing application source ...
---> Installing all dependencies
npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated cryptiles@2.0.5: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated hoek@2.16.3: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated boom@2.10.1: This version is no longer maintained. Please upgrade to the latest version.

> tob-web@0.0.1 preinstall /opt/app-root/src
> node preinstall.js

Copying theme files to src/themes/_active
Theme selected: indy-world
Done.

npm WARN prefer global node-gyp@3.8.0 should be installed with -g

> node-sass@4.11.0 install /opt/app-root/src/node_modules/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.11.0/linux-x64-48_binding.node
Download complete
Binary saved to /opt/app-root/src/node_modules/node-sass/vendor/linux-x64-48/binding.node
Caching binary to /opt/app-root/src/.npm/node-sass/4.11.0/linux-x64-48_binding.node

> uglifyjs-webpack-plugin@0.4.6 postinstall /opt/app-root/src/node_modules/webpack/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js

> node-sass@4.11.0 postinstall /opt/app-root/src/node_modules/node-sass
> node scripts/build.js

Binary found at /opt/app-root/src/node_modules/node-sass/vendor/linux-x64-48/binding.node
Testing binary
Binary is fine

> tob-web@0.0.1 postinstall /opt/app-root/src
> ng build --prod --base-href ${NG_BASE_HREF:-/} ${NG_BUILD_FLAGS:-} && cp dist/themes/_active/index.html dist/index.html

Date: 2018-12-26T18:26:59.606Z
Hash: 74964989c711f64e5fff
Time: 11328ms
chunk {0} polyfills.4d9e683ed365caa3da3e.bundle.js (polyfills) 64.8 kB [initial] [rendered]
chunk {1} main.d4e3ea57bd9f031aba88.bundle.js (main) 434 bytes [initial] [rendered]
chunk {2} styles.bd7c2783ce79f1c86e3d.bundle.css (styles) 1.61 kB [initial] [rendered]
chunk {3} vendor.44e30b54a081b139a9e3.bundle.js (vendor) 208 kB [initial] [rendered]
chunk {4} inline.31e1fb380eb7cf3d75b1.bundle.js (inline) 798 bytes [entry] [rendered]

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '/opt/app-root/src/src'
ERROR in Error: Error encountered resolving symbol values statically. Could not resolve localize-router relative to /opt/app-root/src/src/app/app.module.ts., resolving symbol AppModule in /opt/app-root/src/src/app/app.module.ts, resolving symbol AppModule in /opt/app-root/src/src/app/app.module.ts, resolving symbol AppModule in /opt/app-root/src/src/app/app.module.ts
    at Error (native)
    at syntaxError (/opt/app-root/src/node_modules/@angular/compiler/bundles/compiler.umd.js:1729:34)
    at simplifyInContext (/opt/app-root/src/node_modules/@angular/compiler/bundles/compiler.umd.js:24979:23)
    at StaticReflector.simplify (/opt/app-root/src/node_modules/@angular/compiler/bundles/compiler.umd.js:24991:13)
    at StaticReflector.annotations (/opt/app-root/src/node_modules/@angular/compiler/bundles/compiler.umd.js:24418:41)
    at NgModuleResolver.resolve (/opt/app-root/src/node_modules/@angular/compiler/bundles/compiler.umd.js:14750:70)
    at CompileMetadataResolver.getNgModuleMetadata (/opt/app-root/src/node_modules/@angular/compiler/bundles/compiler.umd.js:15402:60)
    at addNgModule (/opt/app-root/src/node_modules/@angular/compiler/bundles/compiler.umd.js:24268:58)
    at /opt/app-root/src/node_modules/@angular/compiler/bundles/compiler.umd.js:24279:14
    at Array.forEach (native)
    at _createNgModules (/opt/app-root/src/node_modules/@angular/compiler/bundles/compiler.umd.js:24278:26)
    at analyzeNgModules (/opt/app-root/src/node_modules/@angular/compiler/bundles/compiler.umd.js:24153:14)
    at analyzeAndValidateNgModules (/opt/app-root/src/node_modules/@angular/compiler/bundles/compiler.umd.js:24163:35)
    at AotCompiler.analyzeModulesAsync (/opt/app-root/src/node_modules/@angular/compiler/bundles/compiler.umd.js:23797:46)
    at CodeGenerator.codegen (/opt/app-root/src/node_modules/@angular/compiler-cli/src/codegen.js:32:14)
    at Function.NgTools_InternalApi_NG_2.codeGen (/opt/app-root/src/node_modules/@angular/compiler-cli/src/ngtools_api.js:73:30)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/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"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.2 (node_modules/watchpack/node_modules/chokidar/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"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.2 (node_modules/webpack-dev-server/node_modules/chokidar/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"})
npm WARN localize-router-http-loader@0.0.3 requires a peer of localize-router@>=1.0.0-alpha.1 but none was installed.
npm WARN localize-router@2.0.0-RC.2 requires a peer of @angular/core@>=6.0.0 but none was installed.
npm WARN localize-router@2.0.0-RC.2 requires a peer of @angular/common@>=6.0.0 but none was installed.
npm WARN localize-router@2.0.0-RC.2 requires a peer of @angular/router@>=6.0.0 but none was installed.
npm WARN localize-router@2.0.0-RC.2 requires a peer of rxjs@^6.0.0 but none was installed.
npm WARN localize-router@2.0.0-RC.2 requires a peer of @ngx-translate/core@>=10.0.0 but none was installed.
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none was installed.
npm ERR! Linux 4.4.0-98-generic
npm ERR! argv "/opt/rh/rh-nodejs6/root/usr/bin/node" "/opt/rh/rh-nodejs6/root/usr/bin/npm" "install"
npm ERR! node v6.11.3
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! tob-web@0.0.1 postinstall: `ng build --prod --base-href ${NG_BASE_HREF:-/} ${NG_BUILD_FLAGS:-} && cp dist/themes/_active/index.html dist/index.html`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the tob-web@0.0.1 postinstall script 'ng build --prod --base-href ${NG_BASE_HREF:-/} ${NG_BUILD_FLAGS:-} && cp dist/themes/_active/index.html dist/index.html'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the tob-web package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ng build --prod --base-href ${NG_BASE_HREF:-/} ${NG_BUILD_FLAGS:-} && cp dist/themes/_active/index.html dist/index.html
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs tob-web
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls tob-web
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /opt/app-root/src/npm-debug.log
Build failed
ERROR: An error occurred: non-zero (13) exit code from centos/nodejs-6-centos7:6
vtech19 commented 5 years ago

@brycecurtis @vinomaster @masterDev1985 Could you please review above error trace & help ? Some research reveals that it is due to angular version. I have tried to execute it with updated angular version , however it throws error that node6 is not compatible with latest angular.

joaquimpedrooliveira commented 5 years ago

I've made it work editing TheOrgBook/tob-web/package.json and changing localize-routerversion from "git+https://github.com/cywolf/localize-router.git" to "1.0.1"

aappddeevv commented 5 years ago

That change worked for me. I am getting startup errors though in multiple components.

vtech19 commented 5 years ago

I've made it work editing TheOrgBook/tob-web/package.json and changing localize-routerversion from "git+https://github.com/cywolf/localize-router.git" to "1.0.1" @joaquimpedrooliveira thanks it helped to resolve the build issue. @aappddeevv You can open new issue for the start up errors if needed.