On Thu, Apr 30, 2020 at 6:57 pm, Paolo Greppi <paolo.gre...@libpf.com> wrote:
see below ...

Il 30/04/20 18:10, Pirate Praveen ha scritto:
 ...
 I have pushed my changes to babel7 branch and the error I get is,

 gulp build
 [15:53:07] Local gulp not found in /<<PKGBUILDDIR>>
 [15:53:07] Try running: npm install gulp
 [15:53:07] Using globally installed gulp
 [15:53:07] Using gulpfile /<<PKGBUILDDIR>>/gulpfile.js
 [15:53:07] Starting 'build'...
 [15:53:13] Finished 'build' after 6.18 s
 node ./scripts/build-webpack.js
Unhandled rejection TypeError: fileDependencies.map is not a function at compiler.run (/<<PKGBUILDDIR>>/scripts/build-webpack.js:118:38)
 ...

If you get that, it means webpack failed.
The confusing error is because the stats data structure of our webpack (4.30.0) is not compatible with the webpack they expect (2.7.0).

To actually see the errors, tweak the compiler.run callback like this:

compiler.run((err, stats) => {
  var stringify = require('json-stringify-safe');
  console.log(stringify(stats, null, 2));
});

I attach the JSON it prints. Sample extract:

"error": {
  "origin": null,
  "dependencies": null,
  "module": "[Circular ~.compilation.entries.0]",
  "name": "ModuleBuildError",
  "error": {
    "code": "BABEL_VERSION_UNSUPPORTED",
    "version": "6.26.0",
    "range": "^7.0.0-0"
  }
}

I think it would be easier to embed gulp-babel 7.x in node-yarnpkg until we can update babel-loader also.

Reply via email to