The error is coming from this line, which is now inside the workflow definition due to the “Statements cannot be mixed with script declarations” error.
I have so far been unable to create an MWE. Has anyone seen this before?
$ nextflow run .
Nextflow 24.10.3 is available - Please consider updating your version to it
N E X T F L O W ~ version 24.10.2
Launching `./main.nf` [evil_swartz] DSL2 - revision: 9dace5bcde
fake
Access to undefined parameter `test` -- Initialise it to a default value eg. `params.test = some_value` -- Check script './subworkflow.nf' at line: 2 or see '.nextflow.log' file for more details