What can cause a node project to work on one machine but fail on another? (both are using the same versions of node)
In this case, we have 5 developer machines, and it's working on 3 and not on 2. All are pretty new macs. All are using node 9.4 (via nvm. Also I get the same error with node 10).
The main error we are getting when running
yarn start is
.../server/start.js:74 ); ^ SyntaxError: Unexpected token )
NOTE 1: The problem is related to trailing commas in babel https://babeljs.io/docs/en/babel-plugin-syntax-trailing-function-commas/ This comma is automatically inserted by Prettier, I believe!
NOTE 2: I found the problem is this yarn
=> which yarn /Users/otto/.anyenv/envs/ndenv/shims/yarn
And when I run yarn in VScode, it works, because it's using a different yarn.