Could not make cachedir: mkdir /opt/testnetwork/Node/~node/data/goal.cache: no such file or directory

Hi
I am trying to run this code below:
goal app optin --app-id 1 --from $ONE --app-arg “str:vote” -d ~node/data

and here is the result:
could not make cachedir: mkdir /opt/testnetwork/Node/~node/data/goal.cache: no such file or directory

I only use dev not testnet

do I need to switch to testnet first or not?

I’m only following the tutorial :Example Permissioned Voting Stateful Smart Contract Application | Algorand Developer Portal

How did you install the Algorand software?
What is your “ALGORAND_DATA” folder?
What do you mean by “dev network”?

You specified -d ~node/data, which is very unusual.
Usually, it would be -d ~/node/data, if your ALGORAND_DATA folder is in your HOME under node/data.

Nowadays, it is highly recommended to use algokit:

This simplifies everything.