Red Squiggles under imported modules for separated trigger
App Development3 posts190 views1 likesLast activity Apr 2022
MA
MaxOP
Apr 2022My directory structure now looks like
- wallet-refapp (parent)
- triggers (daml project)
- daml
- Trigger.daml
- wallet (daml project)
- daml
- Asset.daml

- 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.

MA
Max
Apr 2022Resolved, 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
Package database is not initialized if IDE is started in a parent directory
opened 06:07PM - 06 Apr 20 UTC
language/now
language
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 2022For 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.