The problem is that testing networks normally use non-standard chain ids (e.g. Ganache). If I want to sign a tx locally, I should do something like:
Error: Chain with ID 123 not supported
at Common.setChain (/private/tmp/tcommon/node_modules/ethereumjs-common/dist/index.js:35:23)
at new Common (/private/tmp/tcommon/node_modules/ethereumjs-common/dist/index.js:16:34)
at new Transaction (/private/tmp/tcommon/node_modules/ethereumjs-tx/dist/transaction.js:65:28)
at Object.<anonymous> (/private/tmp/tcommon/index.js:2:1)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)
The only workaround I see is by extending this class or creating a new one altogether, but it doesn't feel right for users to have to do this.