[Pkg-javascript-devel] ES6 ‘import’ of Debian-installed module

Pirate Praveen praveen at onenetbeyond.org
Tue Mar 6 11:46:51 UTC 2018


On ചൊവ്വ 06 മാർച്ച് 2018 03:45 വൈകു, Ben Finney wrote:
> 
> With that configuration, Webpack finds Backbone, but then fails to find
> jQuery (as needed by the Debian-installed Backbone package).
> 
> =====
> $ webpack --config webpack.config.js
> Hash: a9597112585b9ca5fb40
> Version: webpack 3.5.6
> Time: 248ms
>  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
> =====
> 
> Is that a bug in the Debian Webpack, or a bug in the Debian Backbone, or
> a bug in the Debian jQuery? Or a bug in the Webpack configuration I've
> shown above?

Do you have node-jquery installed? I don't think it is a bug in webpack
or jquery, because the combination work well in case of gitlab.

>> webpack, like other node tools (grunt, gulp) does not recognize global
>> modules. So we need to provide this path manually. But we could make
>> this path default with a patch in debian like we did for grunt and
>> gulp, patches welcome.
> 
> I don't understand the problem well enough to patch it. This is by way
> of diagnosis so far; but yes, I would assume that the Debian-installed
> packages should be found by the Debian-installed Webpack module
> resolver.
> 

Since it is not present in webpack upstream, you can file a wishlist bug.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-javascript-devel/attachments/20180306/963b2cca/attachment.sig>


More information about the Pkg-javascript-devel mailing list