Skip to content
Discussions/App Development/Red Squiggles under imported modules for separated triggerForum ↗

Red Squiggles under imported modules for separated trigger

App Development3 posts190 views1 likesLast activity Apr 2022
MA
MaxOP
Apr 2022

My directory structure now looks like

- wallet-refapp (parent)
   - triggers (daml project)
      - daml
       - Trigger.daml
   - wallet (daml project)
      - daml
       - Asset.daml

Screenshot 2022-04-07 at 7.43.49 PM

  1. to run the trigger locally, do I need to be in the trigger directory, and run
daml trigger --dar .daml/dist/triggers-0.0.1.dar \
             --trigger-name Trigger:autoSendExampleAssetAccountProposal \
             --ledger-host localhost \
             --ledger-port 6865 \
             --ledger-party "a"

I get the error message

Exception in thread "main" com.daml.lf.archive.Error$IO: IO error: java.io.FileNotFoundException: .daml/dist/triggers-0.0.1.dar (No such file or directory)

However, I do have the file, I’m able to build everything, and upload everything onto Daml hub though.
Screenshot 2022-04-07 at 7.50.46 PM

MA
Max
Apr 2022

Resolved, I think. Red lines are still there, but I can run the trigger locally now.
Not entirely sure what fixed it, but following steps in

github.com/digital-asset/daml

To reproduce: ``` mkdir /tmp/foo && cd /tmp/foo daml new bar code . ```

I didn’t have a daml.yaml file in my root. Added that.
daml build for each daml project, then daml studio

CO
cocreature
Apr 2022

For the red lines, that’s the right fix but it should be completely unrelated to the trigger issue. My only guess there is that maybe you started daml trigger from the root directory rather than the triggers directory.

← Back to Discussions