[DRE-maint] Bug#970550: this is a bug in libjs-autoprefixer

Pirate Praveen praveen at onenetbeyond.org
Sun Sep 20 10:14:10 BST 2020


Control: reassign -1 libjs-autoprefixer
Control: found -1 8.6.5-2

On Sun, Sep 20, 2020 at 14:28, Pirate Praveen 
<praveen at onenetbeyond.org> wrote:
> ruby-autoprefixer-rails links to autoprefixer.js provided by 
> libjs-autoprefixer.
> 
> ls -l 
> /usr/share/rubygems-integration/all/gems/autoprefixer-rails-8.6.5/vendor/autoprefixer.js
> lrwxrwxrwx 1 root root 54 Mar  1  2019 
> /usr/share/rubygems-integration/all/gems/autoprefixer-rails-8.6.5/vendor/autoprefixer.js 
> -> ../../../../../javascript/autoprefixer/autoprefixer.js

Build log has many lines like,

(!) Unresolved dependencies
https://rollupjs.org/guide/en#warning-treating-module-as-external-dependency
browserslist (imported by build/lib/autoprefixer.js, 
commonjs-external:browserslist, build/lib/browsers.js, 
build/lib/info.js)

https://buildd.debian.org/status/fetch.php?pkg=node-autoprefixer&arch=all&ver=9.8.0-1&stamp=1590223648&raw=0

which means the umd bundle did not include those dependencies.

Upstream uses browserify to create the browser bundle, but it is not 
packaged in debian. Hence we were forced to create our own rollup 
configuration file.

One way out would be to include the dependencies in the bundle by 
passing custom resolve path in rollup.config.js

After adding
 let fileDest  = 'autoprefixer.js'
 const plugins = [
+  resolve({
+    customResolveOptions: {
+      moduleDirectory: ['/usr/share/nodejs']
+    }
+  }),
   common()
 ]
 module.exports = {

The warning now changes to,

(!) Missing shims for Node.js built-ins
Creating a browser bundle that depends on 'path', 'url' and 'os'. You 
might need to include 
https://www.npmjs.com/package/rollup-plugin-node-builtins
(!) Unresolved dependencies
https://rollupjs.org/guide/en#warning-treating-module-as-external-dependency
path (imported by ../../../usr/share/nodejs/browserslist/index.js, 
commonjs-external:path, ../../../usr/share/nodejs/postcss/lib/input.js, 
../../../usr/share/nodejs/browserslist/node.js, 
../../../usr/share/nodejs/postcss/lib/map-generator.js, 
../../../usr/share/nodejs/postcss/lib/previous-map.js)



More information about the Pkg-ruby-extras-maintainers mailing list