[Pkg-javascript-devel] Bug#995702: TypeError: Cannot read property 'prefix_exceptions' of undefined
Dominik George
natureshadow at debian.org
Mon Oct 4 13:00:49 BST 2021
Package: node-autoprefixer
Version: 10.3.1.0+dfsg1+~cs14.6.19-1
Severity: grave
Justification: renders package unusable
autoprefixer currently does not work because it handles the agents
imported from caniuse-lite wrongly:
/usr/share/nodejs/autoprefixer/lib/browsers.js:64
let prefix = data.prefix_exceptions && data.prefix_exceptions[version]
^
TypeError: Cannot read property 'prefix_exceptions' of undefined
at Browsers.prefix (/usr/share/nodejs/autoprefixer/lib/browsers.js:64:23)
at /usr/share/nodejs/autoprefixer/lib/prefixes.js:193:54
at Array.map (<anonymous>)
at Prefixes.select (/usr/share/nodejs/autoprefixer/lib/prefixes.js:193:31)
at new Prefixes (/usr/share/nodejs/autoprefixer/lib/prefixes.js:133:53)
at loadPrefixes (/usr/share/nodejs/autoprefixer/lib/autoprefixer.js:111:22)
at Object.prepare (/usr/share/nodejs/autoprefixer/lib/autoprefixer.js:121:22)
at /usr/share/nodejs/postcss/lib/lazy-result.js:133:39
at Array.map (<anonymous>)
at new LazyResult (/usr/share/nodejs/postcss/lib/lazy-result.js:131:43)
The problem comes from /usr/share/nodejs/autoprefixer/lib/autoprefixer.js:
let { agents } = require('caniuse-lite')
The object loaded here contains another object called agents. For me, changing line 10
fixes the issue:
- let autoprefixerData = { browsers: agents, prefixes: dataPrefixes }
+ let autoprefixerData = { browsers: agents.agents, prefixes: dataPrefixes }
I have no idea how this problem came to be, and how to properly fix it. Might be
an incompatibility between the versions of autoprefixer and canisue-lite?
-- System Information:
Debian Release: bookworm/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.10.0-8-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=nb_NO.UTF-8, LC_CTYPE=nb_NO.UTF-8 (charmap=UTF-8), LANGUAGE=nb_NO:nb:no_NO:no:nn_NO:nn:da:sv
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages node-autoprefixer depends on:
ii node-browserslist 4.17.0+~cs5.6.76-1
ii node-caniuse-lite 1.0.30001224+dfsg-2
ii node-normalize-range 0.1.2-2
ii node-postcss [node-colorette] 8.2.1+~cs5.3.23-8
ii node-postcss-value-parser 4.1.0-2
ii nodejs 12.22.5~dfsg-5
node-autoprefixer recommends no packages.
node-autoprefixer suggests no packages.
-- no debconf information
More information about the Pkg-javascript-devel
mailing list