parsing error: unexpected token $

That is because you used are regular tick mark ’ instead of a bac ktick `.

You can find the back tick on the key at the upper left of the keyboard.
https://www.computerhope.com/jargon/b/backquot.htm

Please, read the article on template literals .