On Thu, May 14, 2020 at 3:12 pm, Pirate Praveen <prav...@onenetbeyond.org> wrote:
$ yarnpkg
/usr/share/nodejs/@babel/runtime/helpers/inherits.js:5
throw new TypeError("Super expression must either be null or a function");
   ^

TypeError: Super expression must either be null or a function
at _inherits (/usr/share/nodejs/@babel/runtime/helpers/inherits.js:5:11)
   at /usr/share/nodejs/yarn/lib/cli/commands/global.js:58:29
at Object.<anonymous> (/usr/share/nodejs/yarn/lib/cli/commands/global.js:107:2)
   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)

Possibly we are missing some plugins which were part of babel-preset-stage-0 or we may have to patch the original code to be compatible on node 10 without needing transpiling.

I think the missing plugin is babel-plugin-transform-inline-imports-commonjs but when using that, we get the following error during build. See babel7 branch (this plugin is not yet added there).

[18:14:20] Error: Error: No substitution given for "$0". If this is not meant to be a placeholder you may want to consider passing one of the following options to @babel/template: - { placeholderPattern: false, placeholderWhitelist: new Set(['$0'])}
           - { placeholderPattern: /^$0$/ }
   at /usr/share/nodejs/@babel/template/lib/populate.js:27:15
   at Array.forEach (<anonymous>)
at populatePlaceholders (/usr/share/nodejs/@babel/template/lib/populate.js:24:27)
   at /usr/share/nodejs/@babel/template/lib/string.js:22:51
   at /usr/share/nodejs/@babel/template/lib/builder.js:77:14
at PluginPass.exit (/home/pravi/forge/js-team/node-yarnpkg/babel-plugin-transform-inline-imports-commonjs/transform-inline-imports-commonjs.js:358:33)
   at newFn (/usr/share/nodejs/@babel/traverse/lib/visitors.js:193:21)
at NodePath._call (/usr/share/nodejs/@babel/traverse/lib/path/context.js:53:20) at NodePath.call (/usr/share/nodejs/@babel/traverse/lib/path/context.js:40:17) at NodePath.visit (/usr/share/nodejs/@babel/traverse/lib/path/context.js:97:8)
   =============
at module.exports (/home/pravi/forge/js-team/node-yarnpkg/babel-plugin-transform-inline-imports-commonjs/transform-inline-imports-commonjs.js:41:32)
   at /usr/share/nodejs/@babel/core/lib/config/full.js:165:14
at cachedFunction (/usr/share/nodejs/@babel/core/lib/config/caching.js:33:19) at loadPluginDescriptor (/usr/share/nodejs/@babel/core/lib/config/full.js:200:28)
   at /usr/share/nodejs/@babel/core/lib/config/full.js:69:20
   at Array.reduce (<anonymous>)
at recurseDescriptors (/usr/share/nodejs/@babel/core/lib/config/full.js:67:38) at loadFullConfig (/usr/share/nodejs/@babel/core/lib/config/full.js:108:6)

Reply via email to