cat and next line continuation ‘\’

This one, gave me one, huge, headache.

> cat script.sh
#!/bin/bash
cat file \
 | sed "s|aa|bb|g"

> touch file
> ./script.sh
cat:  : No such file or directory
./script.sh: line 3: syntax error near unexpected token `|'
./script.sh: line 3: ` | sed "s|aa|bb|g"'

Yes, you are right, there is an extra space at the end of line cat file \ .