Red Squiggles under imported modules for separated trigger

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

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

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

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.

1 Like