Reputation: 314
I'm posting this mainly for others benefit, as it took a few hours of research to dig down to the problem and I don't imagine it's isolated to our application.
I recently reinstalled all npm packages in our babelified application and started getting errors during build, such as 'Unexpected token (len)'.
After a fair amount of digging around, I started finding const and let in a package called asn1.js.
Upvotes: 1
Views: 274
Reputation: 314
I isolated the const and let to a package called asn1.js.
asn1.js is a low level package responsible for defining data structures for operations such as encryption, more info can be found here.
It has recently been updated to include the new support for const and let with the nodejs LTS update. But these changes were committed, incrementing the minor version. The major version was incremented after (as it's a breaking change).
So if you're getting build errors over the past couple of days and happen to be importing any number of packages that depend on asn1.js you may want to add a fixed import to your package.json for version 4.9.2. As there may be a package with a relaxed semver import in your dependency graph.
Upvotes: 2