openwallet-foundation / credo-ts

Typescript framework for building decentralized identity and verifiable credential solutions
https://credo.js.org
Apache License 2.0
266 stars 200 forks source link

Demo does not build - tightly bound to Indy-SDK? #1616

Closed rmlearney-digicatapult closed 1 year ago

rmlearney-digicatapult commented 1 year ago

MacOS Ventura 13.6.1 node v20.8.1

Demo tightly bound to Indy-SDK?

First attempt:

ο£Ώ ~/git/aries-framework-javascript/demo/ [main] yarn install
yarn install v1.22.19
[1/5] πŸ”  Validating package.json...
error aries-framework@: The engine "node" is incompatible with this module. Expected version "^16 || ^18". Got "20.8.1"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

After fiddling with package.json:

ο£Ώ ~/git/aries-framework-javascript/demo/ [main*] yarn install
yarn install v1.22.19
[1/5] πŸ”  Validating package.json...
[2/5] πŸ”  Resolving packages...
[3/5] 🚚  Fetching packages...
warning Pattern ["@cheqd/ts-proto@cjs"] is trying to unpack in the same destination "/Users/rlearney/Library/Caches/Yarn/v6/npm-@cheqd-ts-proto-2.2.2-c0e808c6d438da7098a225ea24ee94db9822fa06-integrity/node_modules/@cheqd/ts-proto" as pattern ["@cheqd/ts-proto@^2.2.0"]. This could result in non-deterministic behavior, skipping.
[4/5] πŸ”—  Linking dependencies...
warning " > @aries-framework/anoncreds-rs@0.4.2" has unmet peer dependency "@hyperledger/anoncreds-shared@^0.1.0".
warning " > @aries-framework/askar@0.4.2" has unmet peer dependency "@hyperledger/aries-askar-shared@^0.1.0".
warning " > @aries-framework/indy-sdk-to-askar-migration@0.4.2" has unmet peer dependency "@hyperledger/aries-askar-shared@^0.1.0".
warning " > @aries-framework/indy-vdr@0.4.2" has unmet peer dependency "@hyperledger/indy-vdr-shared@^0.1.0".
warning " > @aries-framework/react-native@0.4.2" has unmet peer dependency "react-native@^0.71.4".
warning " > @aries-framework/react-native@0.4.2" has unmet peer dependency "react-native-fs@^2.20.0".
warning " > @aries-framework/react-native@0.4.2" has unmet peer dependency "react-native-get-random-values@^1.8.0".
warning "workspace-aggregator-4c04c22c-aca1-45ff-bbae-cb44746193bb > @aries-framework/react-native > react-native@0.71.7" has unmet peer dependency "react@18.2.0".
warning "workspace-aggregator-4c04c22c-aca1-45ff-bbae-cb44746193bb > @aries-framework/react-native > react-native > metro-react-native-babel-transformer@0.73.9" has unmet peer dependency "@babel/core@*".
warning "workspace-aggregator-4c04c22c-aca1-45ff-bbae-cb44746193bb > @aries-framework/react-native > react-native > react-shallow-renderer@16.15.0" has unmet peer dependency "react@^16.0.0 || ^17.0.0 || ^18.0.0".
warning "workspace-aggregator-4c04c22c-aca1-45ff-bbae-cb44746193bb > @aries-framework/react-native > react-native > use-sync-external-store@1.2.0" has unmet peer dependency "react@^16.8.0 || ^17.0.0 || ^18.0.0".
warning "workspace-aggregator-4c04c22c-aca1-45ff-bbae-cb44746193bb > @aries-framework/core > @digitalcredentials/jsonld-signatures > isomorphic-webcrypto > expo-random@13.1.1" has unmet peer dependency "expo@*".
warning "workspace-aggregator-4c04c22c-aca1-45ff-bbae-cb44746193bb > @aries-framework/core > @digitalcredentials/jsonld-signatures > isomorphic-webcrypto > react-native-securerandom@0.1.1" has unmet peer dependency "react-native@*".
warning "workspace-aggregator-4c04c22c-aca1-45ff-bbae-cb44746193bb > @aries-framework/react-native > react-native > react-native-codegen > jscodeshift@0.13.1" has unmet peer dependency "@babel/preset-env@^7.1.6".
[5/5] πŸ”¨  Building fresh packages...
[1/13] β   indy-sdk
[7/13] β   @mattrglobal/node-bbs-signatures
[-/13] β   waiting...
[4/13] β   ref-napi
warning Error running install script for optional dependency: "/Users/rlearney/git/aries-framework-javascript/node_modules/@mattrglobal/node-bbs-signatures: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build=false
Arguments:
Directory: /Users/rlearney/git/aries-framework-javascript/node_modules/@mattrglobal/node-bbs-signatures
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@1.0.9
node-pre-gyp info using node@20.8.1 | darwin | arm64
node-pre-gyp info check checked for \"/Users/rlearney/git/aries-framework-javascript/node_modules/@mattrglobal/node-bbs-signatures/native/index.node\" (not found)
node-pre-gyp http GET https://github.com/mattrglobal/node-bbs-signatures/releases/download/0.15.0/node-v115-darwin-arm64.tar.gz
node-pre-gyp ERR! install response status 404 Not Found on https://github.com/mattrglobal/node-bbs-signatures/releases/download/0.15.0/node-v115-darwin-arm64.tar.gz
node-pre-gyp ERR! install error
node-pre-gyp ERR! stack Error: response status 404 Not Found on https://github.com/mattrglobal/node-bbs-signatures/releases/download/0.15.0/node-v115-darwin-arm64.tar.gz
node-pre-gyp ERR! stack     at /Users/rlearney/git/aries-framework-javascript/node_modules/@mattrglobal/node-bbs-signatures/node_modules/@mapbox/node-pre-gyp/lib/install.js:67:15
node-pre-gyp ERR! stack     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
node-pre-gyp ERR! System Darwin 22.6.0
node-pre-gyp ERR! command \"/opt/homebrew/Cellar/node/20.8.1/bin/node\" \"/Users/rlearney/git/aries-framework-javascript/node_modules/@mattrglobal/node-bbs-signatures/node_modules/.bin/node-pre-gyp\" \"install\" \"--fallback-to-build=false\"
node-pre-gyp ERR! cwd /Users/rlearney/git/aries-framework-javascript/node_modules/@mattrglobal/node-bbs-signatures
node-pre-gyp ERR! node -v v20.8.1
node-pre-gyp ERR! node-pre-gyp -v v1.0.9
node-pre-gyp ERR! not ok
response status 404 Not Found on https://github.com/mattrglobal/node-bbs-signatures/releases/download/0.15.0/node-v115-darwin-arm64.tar.gz"
info This module is OPTIONAL, you can safely ignore this error
warning Error running install script for optional dependency: "/Users/rlearney/git/aries-framework-javascript/node_modules/@mattrglobal/bls12381-key-pair/node_modules/@mattrglobal/node-bbs-signatures: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build=false
Arguments:
Directory: /Users/rlearney/git/aries-framework-javascript/node_modules/@mattrglobal/bls12381-key-pair/node_modules/@mattrglobal/node-bbs-signatures
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.17.0
node-pre-gyp info using node@20.8.1 | darwin | arm64
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp info check checked for \"/Users/rlearney/git/aries-framework-javascript/node_modules/@mattrglobal/bls12381-key-pair/node_modules/@mattrglobal/node-bbs-signatures/native/index.node\" (not found)
node-pre-gyp http GET https://github.com/mattrglobal/node-bbs-signatures/releases/download/0.13.0/node-v115-darwin-arm64.tar.gz
node-pre-gyp http 404 https://github.com/mattrglobal/node-bbs-signatures/releases/download/0.13.0/node-v115-darwin-arm64.tar.gz
node-pre-gyp ERR! install error
node-pre-gyp ERR! stack Error: 404 status code downloading tarball https://github.com/mattrglobal/node-bbs-signatures/releases/download/0.13.0/node-v115-darwin-arm64.tar.gz
node-pre-gyp ERR! stack     at PassThrough.<anonymous> (/Users/rlearney/git/aries-framework-javascript/node_modules/node-pre-gyp/lib/install.js:142:27)
node-pre-gyp ERR! stack     at PassThrough.emit (node:events:526:35)
node-pre-gyp ERR! stack     at ClientRequest.<anonymous> (/Users/rlearney/git/aries-framework-javascript/node_modules/needle/lib/needle.js:538:9)
node-pre-gyp ERR! stack     at Object.onceWrapper (node:events:629:26)
node-pre-gyp ERR! stack     at ClientRequest.emit (node:events:514:28)
node-pre-gyp ERR! stack     at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:693:27)
node-pre-gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
node-pre-gyp ERR! stack     at TLSSocket.socketOnData (node:_http_client:535:22)
node-pre-gyp ERR! stack     at TLSSocket.emit (node:events:514:28)
node-pre-gyp ERR! stack     at addChunk (node:internal/streams/readable:376:12)
node-pre-gyp ERR! System Darwin 22.6.0
node-pre-gyp ERR! command \"/opt/homebrew/Cellar/node/20.8.1/bin/node\" \"/Users/rlearney/git/aries-framework-javascript/node_modules/@mattrglobal/bls12381-key-pair/node_modules/@mattrglobal/node-bbs-signatures/node_modules/.bin/node-pre-gyp\" \"install\" \"--fallback-to-build=false\"
node-pre-gyp ERR! cwd /Users/rlearney/git/aries-framework-javascript/node_modules/@mattrglobal/bls12381-key-pair/node_modules/@mattrglobal/node-bbs-signatures
node-pre-gyp ERR! node -v v20.8.1
[1/13] ⠐ indy-sdk
[-/13] ⠐ waiting...
[-/13] ⠐ waiting...
[4/13] ⠐ ref-napi
error /Users/rlearney/git/aries-framework-javascript/node_modules/indy-sdk: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /Users/rlearney/git/aries-framework-javascript/node_modules/indy-sdk
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@8.4.1
gyp info using node@20.8.1 | darwin | arm64
gyp info find Python using Python version 3.11.6 found at "/opt/homebrew/opt/python@3.11/bin/python3.11"
gyp http GET https://nodejs.org/download/release/v20.8.1/node-v20.8.1-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v20.8.1/node-v20.8.1-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v20.8.1/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v20.8.1/SHASUMS256.txt
gyp info spawn /opt/homebrew/opt/python@3.11/bin/python3.11
gyp info spawn args [
gyp info spawn args   '/Users/rlearney/git/aries-framework-javascript/node_modules/indy-sdk/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/rlearney/git/aries-framework-javascript/node_modules/indy-sdk/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/rlearney/git/aries-framework-javascript/node_modules/indy-sdk/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/rlearney/Library/Caches/node-gyp/20.8.1/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/rlearney/Library/Caches/node-gyp/20.8.1',
gyp info spawn args   '-Dnode_gyp_dir=/Users/rlearney/git/aries-framework-javascript/node_modules/indy-sdk/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/rlearney/Library/Caches/node-gyp/20.8.1/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/rlearney/git/aries-framework-javascript/node_modules/indy-sdk',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/indynodejs/src/indy.o
In file included from ../src/indy.cc:4:
../../nan/nan.h:686:39: warning: 'IdleNotificationDeadline' is deprecated: Use MemoryPressureNotification() to influence the GC schedule. [-Wdeprecated-declarations]
    return v8::Isolate::GetCurrent()->IdleNotificationDeadline(
                                      ^
/Users/rlearney/Library/Caches/node-gyp/20.8.1/include/node/v8-isolate.h:1291:3: note: 'IdleNotificationDeadline' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON(
  ^
/Users/rlearney/Library/Caches/node-gyp/20.8.1/include/node/v8config.h:550:39: note: expanded from macro 'V8_DEPRECATE_SOON'
# define V8_DEPRECATE_SOON(message) [[deprecated(message)]]
                                      ^
1 warning generated.
  SOLINK_MODULE(target) Release/indynodejs.node
ld: library 'indy' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/indynodejs.node] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/rlearney/git/aries-framework-javascript/node_modules/indy-sdk/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:514:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:294:12)
gyp ERR! System Darwin 22.6.0
gyp ERR! command "/opt/homebrew/Cellar/node/20.8.1/bin/node" "/Users/rlearney/git/aries-framework-javascript/node_modules/indy-sdk/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/rlearney/git/aries-framework-javascript/node_modules/indy-sdk
berendsliedrecht commented 1 year ago

Currently, this is the case. We are moving away from this, but I do not have an ETA for when this work is done.

If you want to run the demo with indy, you can follow the setup guides here: https://aries.js.org/guides/0.4/getting-started/set-up/indy-sdk