Open ChristianOConnor opened 1 year ago
Hi @ChristianOConnor the error you're seeing is actually in the JavaScript execution, not the shift
shell command. So in the tutorial on my blog, I didn't completely Dockerize this example; it assumes you're running Node 14 both in the container and on your host. This was just to simplify the instructions when I wrote it. I suspect what's happened here is you have a different version of Node on your host. I'd suggest downloading and installing Node Version Manager (nvm) and running nvm use 14
on your host machine before you run
npm init -y
npm install express mongodb
as per the tutorial steps. Hope this helps!
When I run the command
docker compose up -d
in the same directory as the docker-compose.yml file, I get this in the node-server logs:The wait.sh file where the error is occuring looks like this:
So why is "shift 2" causing this
SyntaxError: Unexpected number
error? How do I fix this?