[Pkg-javascript-devel] Bug#959798: Bug#959798: libjs-webrtc-adapter ftbfs with node-grunt-babel 8.0 (using babel 7.4) in experimental
Jonas Smedegaard
jonas at jones.dk
Thu May 14 16:03:31 BST 2020
Quoting Jonas Smedegaard (2020-05-14 16:48:37)
> Quoting Pirate Praveen (2020-05-14 14:18:20)
> > On Thu, May 14, 2020 at 1:12 pm, Jonas Smedegaard <jonas at jones.dk>
> > wrote:
> > > Quoting Pirate Praveen (2020-05-05 15:11:31)
> > >> I'm planning to upload node-grunt-babel 8.0 in unstable (it is in
> > >> experimental currently). I have fixed all the reverse build
> > >> dependencies and this is the only remaining blocker. I have fixed
> > >> this package in babel7 branch of salsa.
> > >
> > > I doubt the patch was actually tested - I was unable to reproduce a
> > > succesful build.
> > >
> >
> > It built fine for me, attaching sbuild log.
>
> Thanks, that was (not enough, but) very helpful: autopkgtest still fails
> for me, and I would appreciate if you could test if you agree that it
> fails for you as well.
>
> Turns out there are two issues here:
>
> With Babel 6, "babeljs --out-dir dist src/foo.js src/deeper/bar.js"
> creates dist/deeper/bar.js, where with Babel 7 that command instead
> creates dist/bar.js - your latest patch changes to an alternative form
> "babeljs --out-dir dist src" which works. Thanks for that!
>
> Another issue (also experienced with your earlier gulp patch) is that
> the _content_ produced by Babel 6 works with the (arguably crude and
> unsupported) autopkgtest, but with Babel 7 it fails like this:
>
> Error: Cannot find module ./utils
> at modRequire (/usr/share/javascript/webrtc-adapter/adapter.js:10:22)
> at Object.1 (/usr/share/javascript/webrtc-adapter/adapter.js:40:37)
> at req (/usr/share/javascript/webrtc-adapter/adapter.js:6:22)
> at modRequire (/usr/share/javascript/webrtc-adapter/adapter.js:11:14)
> at Object.0../adapter_factory.js (/usr/share/javascript/webrtc-adapter/adapter.js:26:24)
> at req (/usr/share/javascript/webrtc-adapter/adapter.js:6:22)
> at 0../adapter_factory.js (/usr/share/javascript/webrtc-adapter/adapter.js:2:20)
> at Object.<anonymous> (/usr/share/javascript/webrtc-adapter/adapter.js:14:3)
> at Module._compile (internal/modules/cjs/loader.js:778:30)
> at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
>
>
> The generated code is also suspicously much much smaller.
>
> This pattern works with Babel 6:
>
> babeljs --cwd src/deeper --out-dir dist src/foo.js src/deeper/bar.js
>
> ...but there is no "cwd" command-line option with Babel 7, it seems.
Weird: --cwd doesn't work with Babel 6 either, not sure what worked
before.
Seems "--source-root src/js/index.js" is the equivalent of gulp "cwd"
option. Works with Babel 6 - trying now with Babel 7...
- Jonas
--
* Jonas Smedegaard - idealist & Internet-arkitekt
* Tlf.: +45 40843136 Website: http://dr.jones.dk/
[x] quote me freely [ ] ask before reusing [ ] keep private
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20200514/03ae6367/attachment.sig>
More information about the Pkg-javascript-devel
mailing list