[Pkg-javascript-devel] node-rollup-plugin-babel: build error unrepro but babelHelpers missing error in autopkgtest
Paolo Greppi
paolo.greppi at libpf.com
Wed Jan 17 10:05:44 UTC 2018
First the good news: I dont' get the build error on sid today. Maybe that problem has solved by itself ;-)
But the autopkgtest fails with the babelHelpers missing error as rollup and node-react:
/usr/lib/nodejs/rollup-plugin-babel/dist/rollup-plugin-babel.cjs.js:6544
var isSymbol = USE_NATIVE && babelHelpers.typeof($Symbol.iterator) == 'symbol' ? function (it) {
^
ReferenceError: babelHelpers is not defined
at Object.<anonymous> (/usr/lib/nodejs/rollup-plugin-babel/dist/rollup-plugin-babel.cjs.js:6544:30)
at __webpack_require__ (/usr/lib/nodejs/rollup-plugin-babel/dist/rollup-plugin-babel.cjs.js:20:30)
at Object.<anonymous> (/usr/lib/nodejs/rollup-plugin-babel/dist/rollup-plugin-babel.cjs.js:18563:1)
at __webpack_require__ (/usr/lib/nodejs/rollup-plugin-babel/dist/rollup-plugin-babel.cjs.js:20:30)
at Object.<anonymous> (/usr/lib/nodejs/rollup-plugin-babel/dist/rollup-plugin-babel.cjs.js:6470:31)
at __webpack_require__ (/usr/lib/nodejs/rollup-plugin-babel/dist/rollup-plugin-babel.cjs.js:20:30)
at Object.<anonymous> (/usr/lib/nodejs/rollup-plugin-babel/dist/rollup-plugin-babel.cjs.js:1418:15)
at __webpack_require__ (/usr/lib/nodejs/rollup-plugin-babel/dist/rollup-plugin-babel.cjs.js:20:30)
at Object.<anonymous> (/usr/lib/nodejs/rollup-plugin-babel/dist/rollup-plugin-babel.cjs.js:2983:16)
at __webpack_require__ (/usr/lib/nodejs/rollup-plugin-babel/dist/rollup-plugin-babel.cjs.js:20:30)
It seems the rollup-plugin-babel cjs build with webpack has something wrong.
It is much larger than the one built by upstream with rollup:
npm install rollup-plugin-babel
ls -l node_modules/rollup-plugin-babel/dist/* /usr/lib/nodejs/rollup-plugin-babel/dist/*
ls -l node_modules/rollup-plugin-babel/dist/* /usr/lib/nodejs/rollup-plugin-babel/dist/*
-rw-r--r-- 1 root root 5533 Dec 18 12:22 node_modules/rollup-plugin-babel/dist/rollup-plugin-babel.cjs.js
-rw-r--r-- 1 root root 5486 Dec 18 12:22 node_modules/rollup-plugin-babel/dist/rollup-plugin-babel.es.js
-rw-r--r-- 1 root root 1526968 Jan 5 14:35 /usr/lib/nodejs/rollup-plugin-babel/dist/rollup-plugin-babel.cjs.js
I noticed that these messages come up during the node-rollup-plugin-babel build with webpack (sorted and compacted):
WARNING in /usr/lib/nodejs/babel-core/lib/transformation/file/options/option-manager.js
190:19-37 Critical dependency: the request of a dependency is an expression
307:16-34 Critical dependency: the request of a dependency is an expression
WARNING in /usr/lib/nodejs/babel-core/lib/transformation/file/index.js
511:24-39 Critical dependency: the request of a dependency is an expression
WARNING in /usr/lib/nodejs/base/utils.js
3:34-41 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
It looks like this is by design in webpack:
https://github.com/webpack/webpack-dev-server/issues/212
SO apparently this can not be built with webpack after all ...
Paolo
More information about the Pkg-javascript-devel
mailing list