I don’t know is it better to describe it here or in errata.
First line of
cat.js (page 18 of PDF) looks like this:
#!/usr/bin/env node --harmony
When I run this code a shell tells me
/usr/bin/env: node --harmony: No such file or directory
If I remove
--harmony token, it works fine.
Some research shows that we cannot pass arguments into env. So, this example needs to be fixed. Probably, node.js look at some environment variables to enable some version of ECMAScript?
Another solution could be to hardcode path to node: