[Pkg-javascript-devel] node-rollup-plugin-babel: build error unrepro but babelHelpers missing error in autopkgtest

Pirate Praveen praveen at onenetbeyond.org
Wed Jan 17 11:24:11 UTC 2018



On 2018, ജനുവരി 17 3:35:44 PM IST, Paolo Greppi <paolo.greppi at libpf.com> wrote:
>First the good news: I dont' get the build error on sid today. Maybe
>that problem has solved by itself ;-)

I think the build error was fixed by adding external-helpers plugin.

>But the autopkgtest fails with the babelHelpers missing error as rollup
>and node-react:

This can be fixed by adding babeljs-external-helpers output at the top of the umd file.

>/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 ...

These warnings are gone with latest versions of base but it will break snapdragon. New version of snapdragon does not depend on base, but it will break braces. And braces upstream is not interested to update to newer snapdragon, but he is open to pull requests.

So the solution is to update braces to use snapdragon 0.11.

>Paolo

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



More information about the Pkg-javascript-devel mailing list