[Pkg-javascript-devel] Bug#892227: Bug#892227: node-backbone: dependencies fail to resolve when jQuery not installed

Jonas Smedegaard jonas at jones.dk
Wed Mar 7 01:31:38 UTC 2018


Quoting Ben Finney (2018-03-07 01:04:19)
> Package: node-backbone
> Version: 1.3.3~dfsg-3
> Severity: normal
> 
> The dependencies for ‘node-backbone’ do not allow a Backbone
> application to be built with Webpack.
> 
> =====
> $ dpkg --list webpack
> […]
> ii  webpack        3.5.6-1      all          Packs CommonJs/AMD modules for the browser
> 
> $ webpack --version
> 3.5.6
> 
> $ cat ./webpack.config.js
> "use strict";
> const path = require('path');
> module.exports = {
>     entry: './source/foo.js',
>     output: {
>         path: path.resolve(__dirname, 'dist'),
>         filename: 'app.js',
>     },
>     resolve: {
>         modules: ['/usr/lib/nodejs', '.'],
>     },
>     resolveLoader: {
>         modules: ['/usr/lib/nodejs'],
>     },
> };
> 
> $ cat ./source/foo.js
> "use strict";
> import 'backbone';
> 
> $ webpack --config webpack.config.js
> Hash: a9597112585b9ca5fb40
> Version: webpack 3.5.6
> Time: 209ms
>  Asset    Size  Chunks             Chunk Names
> app.js  129 kB       0  [emitted]  main
>    [0] ./source/foo.js 34 bytes {0} [built]
>    [1] /usr/share/javascript/backbone/backbone.js 72.2 kB {0} [built]
>    [2] (webpack)/buildin/global.js 488 bytes {0} [built]
>    [3] /usr/share/javascript/underscore/underscore.js 52.9 kB {0} [built]
> 
> ERROR in /usr/share/javascript/backbone/backbone.js
> Module not found: Error: Can't resolve 'jquery' in '/usr/share/javascript/backbone'
>  @ /usr/share/javascript/backbone/backbone.js 17:4-21:6
>  @ ./source/foo.js
> =====
> 
> So the Debian package dependencies are all satisfied, but these are
> not sufficient for Webpack to resolve the Backbone dependencies.

Backbone by design avoids dependency on jQuery.  Applications may use 
jQuery via Backbone, or may choose to instead use Zepto or Lodash, and 
then need themselves to make sure the chosen helper is available.

At http://backbonejs.org/ is listed a few projects choosing to use 
Backbone with Zepto instead of jQuery.


 - 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://lists.alioth.debian.org/pipermail/pkg-javascript-devel/attachments/20180307/c9f128d3/attachment.sig>


More information about the Pkg-javascript-devel mailing list