Solved. It was caused by the link-to-parent-package.json workaround for lambdas-in-monorepos problem. I had two node_modules directories, supposedly both built from the same package.json, but only one had been updated. Once I deleted the "unimportant" one, everything started working again.