I have just created an Ubuntu 18.04 instance on AWS and copied an existing project over. The usual shebang line for Node #!/usr/bin/env node now doesn't work. It gave:
#!/usr/bin/env: No such file or directory
What could be wrong?
My $PATH variable is:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
which node gives: /usr/bin/node
which nodejs gives /usr/bin/nodejs
ls -l nodejs gives: /usr/bin/nodejs -> /etc/alternatives/nodejs
ls -l /usr/bin/env gives:
-rwxr-xr-x 1 root root 35000 Jan 18 2018 /usr/bin/env