[Pkg-javascript-devel] Removing babel 6: Call for help

Pirate Praveen praveen at onenetbeyond.org
Mon May 11 07:25:15 BST 2020



On 2020, മേയ് 11 2:19:01 AM IST, Xavier <yadd at debian.org> wrote:
>Le 10/05/2020 à 21:23, Pirate Praveen a écrit :
>> 
>> 
>> On Sat, May 9, 2020 at 10:54 pm, Xavier <yadd at debian.org> wrote:
>>> Thanks for your awesome work!
>> 
>> Thanks to you, Jonas and Nilesh too for helping.
>> 
>> Can somoene check babel7 branch in node-yarnpkg? It builds fine but I
>> probably need to include some specific plugins from stage-0 preset. It
>> builds fine, but when you try to run, it fails with this error.
>> 
>> $ yarnpkg
>> /usr/share/nodejs/@babel/runtime/helpers/inherits.js:5
>>    throw new TypeError("Super expression must either be null or a
>> function");
>>    ^
>
>In `function _inherits(subClass, superClass)`, superClass is "undefined"
>instead of "null".
>
>Adding (in babel7) `if(superClass===undefined) superClass=null;` fixes
>this problem but then:
>
>/usr/share/nodejs/yarn/lib/util/generate-pnp-map-api.tpl.js:28
>var ignorePattern = $$BLACKLIST ? new RegExp($$BLACKLIST) : null;
>                    ^
>ReferenceError: $$BLACKLIST is not defined
>    at Object.<anonymous>
>(/usr/share/nodejs/yarn/lib/util/generate-pnp-map-api.tpl.js:28:21)
>    at Module._compile (internal/modules/cjs/loader.js:778:30)
>    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
>    at Module.load (internal/modules/cjs/loader.js:653:32)
>    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
>    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
>    at Module.require (internal/modules/cjs/loader.js:692:17)
>    at require (internal/modules/cjs/helpers.js:25:18)
>    at Object.<anonymous>
>(/usr/share/nodejs/yarn/lib/util/generate-pnp-map.js:22:52)
>    at Module._compile (internal/modules/cjs/loader.js:778:30)
>
>So it seems that this is not an error on babel7 side but on yarn build

With babel 6, they use node-babel-preset-stage-0 which is not available in babel 7, we need to specify the plugins from that preset explicitly.

For the webpack error, it does not fail the build and it was there before too.
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



More information about the Pkg-javascript-devel mailing list