Skip to content
CCPEDIAby Unity Nodes
App Development

Ex-supply-chain

10 posts415 views3 likesLast activity May 2021

  1. Tiziano_SellaOP 1
    cd ui && yarn install --force --frozen-lockfile
    yarn install v1.22.10
    [1/4] Resolving packages...
    [2/4] Fetching packages...
    info fsevents@2.3.2: The platform "linux" is incompatible with this module.
    info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
    info fsevents@1.2.13: The platform "linux" is incompatible with this module.
    info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
    [3/4] Linking dependencies...
    warning " > request-promise@4.2.6" has unmet peer dependency "request@^2.34".
    warning "request-promise > request-promise-core@1.1.4" has unmet peer dependency "request@^2.34".
    [4/4] Rebuilding all packages...
    Done in 48.47s.
    

    installation on ubuntu 20.04

    where’s error ?

  2. cocreature 1

    Hi @Tiziano_Sella,

    That output looks fine. Those are some harmless warnings. The installation of the dependencies seems to be succesful in the end.

  3. Tiziano_Sella
    • make build

    Note: If you change the DAML models locally, you need to re-run this command before starting the application.

    • Use separate terminals to launch the individual components:

    launchers/sandbox+jsonapi+populate launchers/automation launchers/ui
    launchers/automation
    launchers/ui

    does not work, how should it be launched?
    thanks

    The demo will run at http://localhost:3000

  4. cocreature

    Can you expand on “does not work”? Which commands did you run and which error are you running into?

  5. Tiziano_Sella

    what commands should I give to execute on terminal to execute the 3 instructions?

  6. cocreature

    Exactly the three commands above starting with launchers you listed above. Here are the commands + their expected output:

    1. launchers/sandbox+jsonapi+populate
    $ launchers/sandbox+jsonapi+populate
    Compiling supplychain to a DAR.
    Created .daml/dist/supplychain-1.0.0.dar
    Waiting for sandbox to start:
    INFO: Slf4jLogger started
    INFO: Listening on localhost:6865 over plain text.
       ____             ____
      / __/__ ____  ___/ / /  ___ __ __
     _\ \/ _ `/ _ \/ _  / _ \/ _ \\ \ /
    /___/\_,_/_//_/\_,_/_.__/\___/_\_\
    
    INFO: Initialized sandbox version 1.12.0 with ledger-id = supply-chain, port = 6865, dar file = List(.daml/dist/supplychain-1.0.0.dar), time mode = wall-clock time, ledger = in-memory, auth-service = AuthServiceWildcard$, contract ids seeding = strong
    Running the initialization script.
    Waiting for JSON API to start:
    19:08:06.906 [main] INFO  com.daml.http.Main$ - Config(ledgerHost=localhost, ledgerPort=6865, address=127.0.0.1, httpPort=7575, portFile=None, packageReloadInterval=5 seconds, packageMaxInboundMessageSize=None, maxInboundMessageSize=4194304, tlsConfig=TlsConfiguration(false,None,None,None,REQUIRE,false,List()), jdbcConfig=None, staticContentConfig=None, allowNonHttps=true, accessTokenFile=None, wsConfig=None, nonRepudiationCertificateFile=None, nonRepudiationPrivateKeyFile=None, nonRepudiationPrivateKeyAlgorithm=None)
    19:08:07.331 [http-json-ledger-api-akka.actor.default-dispatcher-4] INFO  akka.event.slf4j.Slf4jLogger - Slf4jLogger started
    19:08:09.139 [http-json-ledger-api-akka.actor.default-dispatcher-6] INFO  com.daml.http.HttpService$ - Connected to Ledger: supply-chain
    19:08:09.141 [http-json-ledger-api-akka.actor.default-dispatcher-6] INFO  com.daml.http.HttpService$ - contractDao: None
    19:08:10.536 [http-json-ledger-api-akka.actor.default-dispatcher-6] INFO  com.daml.http.PackageService - new package IDs loaded: c1f1f00558799eec139fb4f4c76f95fb52fa1837a5dd29600baa1c8ed1bdccfd, 733e38d36a2759688a4b2c4cec69d48e7b55ecc8dedc8067b815926c917a182a, bfcd37bd6b84768e86e432f5f6c33e25d9e7724a9d42e33875ff74f6348e733f, 518032f41fd0175461b35ae0c9691e08b4aea55e62915f8360af2cc7a1f2ba6c, 838b4982663e440799f71f93bcbad311dd19ddf5e00b6faf552d77ecf0c8ba3d, cc348d369011362a5190fe96dd1f0dfbc697fdfd10e382b9e9666f0da05961b7, 6839a6d3d430c569b2425e9391717b44ca324b88ba621d597778811b2d05031d, 99a2705ed38c1c26cbb8fe7acf36bbf626668e167a33335de932599219e0a235, 76bf0fd12bd945762a01f8fc5bbcdfa4d0ff20f8762af490f8f41d6237c6524f, e22bce619ae24ca3b8e6519281cb5a33b64b3190cc763248b4c3f9ad5087a92c, b5f4956f34e1287e61d010cebb9a183fd4b3f18118fd0eed41f691954d41063a, d58cf9939847921b2aab78eaa7b427dc4c649d25e6bee3c749ace4c3f52f5c97, 6c2c0667393c5f92f1885163068cd31800d2264eb088eb6fc740e11241b2bf06, 046a0de1374de97a9881df1e91c837cbc8b6a64d3522ecd297ab1b7ee95b9de4, d14e08374fc7197d6a0de468c968ae8ba3aadbf9315476fd39071831f5923662, 057eed1fd48c238491b8ea06b9b5bf85a5d4c9275dd3f6183e0e6b01730cc2ba, 1178b10733de7db22ce054f348635db86bae6a0ecbdfdc830c7071e9a9ed1fb7, e491352788e56ca4603acc411ffe1a49fefd76ed8b163af86cf5ee5f4c38645b, 40f452260bef3f29dede136108fc08a88d5a5250310281067087da6f0baddff7, 97b883cd8a2b7f49f90d5d39c981cf6e110cf1f1c64427a28a6d58ec88c43657, 8a7806365bbd98d88b4c13832ebfa305f6abaeaf32cfa2b7dd25c4fa489b79fb
    19:08:11.154 [http-json-ledger-api-akka.actor.default-dispatcher-6] INFO  com.daml.http.Main$ - Started server: ServerBinding(/127.0.0.1:7575)
    ..........................
    Press 'r' to re-build and upload the package to the sandbox.
    Press 'Ctrl-C' to quit.
    
    1. launchers/automation
    $ launchers/automation
    Waiting for ledger...
    Connected to ledger.
    Waiting for 679075 679076 679077 679079 679081
    Trigger  is running as Seller (context: {triggerDefinition=0b8a56276946ced2c7790724d557574fe64c7c186c6f247dcb6d716ad3f63233:DA.RefApps.SupplyChain.Triggers.DeliveryCompleteTrigger:trigger})
    Trigger  is running as Seller (context: {triggerDefinition=0b8a56276946ced2c7790724d557574fe64c7c186c6f247dcb6d716ad3f63233:DA.RefApps.SupplyChain.Triggers.AggregatedQuoteTrigger:trigger})
    Trigger  is running as Warehouse1 (context: {triggerDefinition=0b8a56276946ced2c7790724d557574fe64c7c186c6f247dcb6d716ad3f63233:DA.RefApps.SupplyChain.Triggers.InventoryQuoteRequestTrigger:trigger})
    Trigger  is running as Supplier (context: {triggerDefinition=0b8a56276946ced2c7790724d557574fe64c7c186c6f247dcb6d716ad3f63233:DA.RefApps.SupplyChain.Triggers.CalculateAggregatedQuoteTrigger:trigger})
    Trigger  is running as Warehouse2 (context: {triggerDefinition=0b8a56276946ced2c7790724d557574fe64c7c186c6f247dcb6d716ad3f63233:DA.RefApps.SupplyChain.Triggers.InventoryQuoteRequestTrigger:trigger})
    
    1. launchers/ui
    $ launchers/ui
    Compiled successfully!
    
    You can now view supply-chain in the browser.
    
      Local:            http://localhost:3000
      On Your Network:  http://192.168.1.135:3000
    
    Note that the development build is not optimized.
    To create a production build, use yarn build.
    
    [HPM] Upgrading to WebSocket
    
  7. Tiziano_Sella
    cocreature:

    launchers/sandbox+jsonapi+populate

    $ launchers/sandbox+jsonapi+populate
    bash: launchers/sandbox+jsonapi+pupulate : file o directory non esistente
    abort … message

  8. cocreature

    Maybe try './launchers/sandbox+jsonapi+populate' (note the quotes).

    And make sure you run make build before that.

  9. Tiziano_Sella

    yes, but now I try again

    thank’s
    Tiziano

  10. Tiziano_Sella 1

    ok, it works!
    Tiziano