[Pkg-javascript-devel] Bug#962037: 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 20:57:35 BST 2020



On Wed, Jun 3, 2020 at 12:29 am, Pirate Praveen 
<praveen at onenetbeyond.org> wrote:
> 
> 
> 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.

Now I think we are closer to how upstream ships these files, but 
rainloop still fails to build

(node:423913) UnhandledPromiseRejectionWarning: TypeError 
[ERR_INVALID_ARG_TYPE]: The first argument must be one of type string, 
Buffer, ArrayBuffer, Array, or Array-like Object. Received type object
    at Function.from (buffer.js:231:9)
    at new Buffer (buffer.js:181:17)
    at /<<PKGBUILDDIR>>/debian/build/gulp-less.js:40:23
    at parse (/usr/share/nodejs/less/dist/less.cjs.js:11461:17)
    at Parser.parse (/usr/share/nodejs/less/dist/less.cjs.js:11711:21)
    at ImportVisitor.finish [as _finish] 
(/usr/share/nodejs/less/dist/less.cjs.js:7701:28)
    at ImportVisitor._onSequencerEmpty 
(/usr/share/nodejs/less/dist/less.cjs.js:5832:14)
    at ImportSequencer.tryRun 
(/usr/share/nodejs/less/dist/less.cjs.js:5797:18)
    at /usr/share/nodejs/less/dist/less.cjs.js:5766:29
    at fileParsedFunc (/usr/share/nodejs/less/dist/less.cjs.js:11331:21)
(node:423913) UnhandledPromiseRejectionWarning: Unhandled promise 
rejection. This error originated either by throwing inside of an async 
function without a catch block, or by rejecting a promise which was not 
handled with .catch(). (rejection id: 1)
[19:54:10] Finished '<anonymous>' after 18 s
[19:54:10] Starting 'jsLibs'...
[19:54:10] Starting 'jsApp'...
[19:54:10] Starting 'jsAdmin'...
[19:54:10] 'jsLibs' errored after 17 ms
[19:54:10] Error: File not found with singular glob: 
/usr/lib/nodejs/autolinker/dist/Autolinker.js (if this was purposeful, 
use `allowEmpty` option)
    at Glob.<anonymous> 
(/usr/share/nodejs/glob-stream/readable.js:84:17)
    at Object.onceWrapper (events.js:286:20)
    at Glob.emit (events.js:198:13)
    at Glob.EventEmitter.emit (domain.js:448:20)
    at Glob._finish (/usr/share/nodejs/glob/glob.js:197:8)
    at done (/usr/share/nodejs/glob/glob.js:182:14)
    at Glob._processSimple2 (/usr/share/nodejs/glob/glob.js:688:12)
    at /usr/share/nodejs/glob/glob.js:676:10
    at Glob._stat2 (/usr/share/nodejs/glob/glob.js:772:12)
    at lstatcb_ (/usr/share/nodejs/glob/glob.js:764:12)
[19:54:10] 'rainloop' errored after 18 s
[19:54:10] The following tasks did not complete: <series>, <parallel>, 
cssMainBuild, jsApp, jsAdmin
[19:54:10] Did you forget to signal async completion?

We could try building rainloop with npm version of less 3.11.2 to 
confirm if it is rainloop that needs updating or less that needs fixing.



More information about the Pkg-javascript-devel mailing list