[Pkg-javascript-devel] Bug#962037: Bug#962037: Bug#962037: Plan B for not being able to replicate upstream exports exactly

Pirate Praveen praveen at onenetbeyond.org
Tue Jun 2 19:59:58 BST 2020



On Tue, Jun 2, 2020 at 10:33 pm, Pirate Praveen 
<praveen at onenetbeyond.org> wrote:
> I'm trying to close the gap between upstream build and our builds by 
> using rollup to generate cjs file as well, but build fails with this 
> error.
> 
> 	/usr/bin/node -e require\(\"./.\"\)
> /home/pravi/forge/js-team/less.js/dist/less.cjs.js:17699
> const { Barrett } = BigInteger.prototype;
>                               ^
> 
> TypeError: Cannot read property 'prototype' of undefined
>    at Object.<anonymous> 
> (/home/pravi/forge/js-team/less.js/dist/less.cjs.js:17699:32)
> 
> This code comes from node-ecc-jsbn and it looks like a bug there, its 
> package.json wants jsbn 0.1 but we already have 1.0

This was caused when copied the rollup.config.js for umd to build cjs, 
it had BUNDLE = true which created this issue. Also there was no need 
to use babel except for ES module to CJS conversion which rollup alone 
can do. Hopefully this will fix the issue. Running the tests now.



More information about the Pkg-javascript-devel mailing list