Debian Bug report logs -
#1009245
ruby-autoprefixer-rails: broken build (TypeError: Cannot read property 'env' of undefined)
Reported by: Pirate Praveen <praveen@onenetbeyond.org>
Date: Sat, 9 Apr 2022 19:42:02 UTC
Severity: serious
Found in version node-autoprefixer/10.4.2.0+dfsg1+~cs24.8.4-1
Fixed in version node-autoprefixer/10.4.2.0+dfsg1+~cs24.8.4-2
Done: Pirate Praveen <praveen@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>:
Bug#1009245; Package ruby-autoprefixer-rails.
(Sat, 09 Apr 2022 19:42:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Pirate Praveen <praveen@onenetbeyond.org>:
New Bug report received and forwarded. Copy sent to Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>.
(Sat, 09 Apr 2022 19:42:04 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: ruby-autoprefixer-rails
Version: 10.4.2.0+dfsg1+~cs24.8.4-1
Severity: serious
gitlab precompiling assets fails with the following error
(ruby-autoprefixer-rails version in bullseye works)
ExecJS::ProgramError: TypeError: Cannot read property 'env' of undefined
(execjs):2584:14
(execjs):3189:3
(execjs):73702:3
(execjs):73723:14
(execjs):1:40
Object.<anonymous> ((execjs):1:58)
Module._compile (internal/modules/cjs/loader.js:999:30)
Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
Module.load (internal/modules/cjs/loader.js:863:32)
Function.Module._load (internal/modules/cjs/loader.js:708:14)
/usr/share/rubygems-integration/all/gems/autoprefixer-rails-10.4.2.0/lib/autoprefixer-rails/proc
essor.rb:133:in `runtime'
/usr/share/rubygems-integration/all/gems/autoprefixer-rails-10.4.2.0/lib/autoprefixer-rails/proc
essor.rb:35:in `process'
/usr/share/rubygems-integration/all/gems/autoprefixer-rails-10.4.2.0/lib/autoprefixer-rails/spro
ckets.rb:22:in `run'
/usr/share/rubygems-integration/all/gems/autoprefixer-rails-10.4.2.0/lib/autoprefixer-rails/spro
ckets.rb:16:in `call'
/usr/share/rubygems-integration/all/gems/sprockets-rails-3.4.1/lib/sprockets/rails/task.rb:67:in
`block (3 levels) in define'
/usr/share/rubygems-integration/all/gems/sprockets-rails-3.4.1/lib/sprockets/rails/task.rb:66:in
`block (2 levels) in define'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/exe/rake:27:in
`<top (required)>'
Tasks: TOP => assets:precompile
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>:
Bug#1009245; Package ruby-autoprefixer-rails.
(Sat, 09 Apr 2022 20:27:02 GMT) (full text, mbox, link).
Acknowledgement sent
to Pirate Praveen <praveen@onenetbeyond.org>:
Extra info received and forwarded to list. Copy sent to Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>.
(Sat, 09 Apr 2022 20:27:02 GMT) (full text, mbox, link).
Message #10 received at 1009245@bugs.debian.org (full text, mbox, reply):
Same asset precompiling works after,
gem install -v 10.4.2.0 autoprefixer-rails
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>:
Bug#1009245; Package ruby-autoprefixer-rails.
(Tue, 12 Apr 2022 18:39:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Akshay S Dinesh <akshay@learnlearn.in>:
Extra info received and forwarded to list. Copy sent to Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>.
(Tue, 12 Apr 2022 18:39:03 GMT) (full text, mbox, link).
Message #15 received at 1009245@bugs.debian.org (full text, mbox, reply):
There is a possibility that this is related to the execjs version.
https://github.com/ai/autoprefixer-rails/issues/203#issuecomment-838512342
On the other hand, the autoprefixer.js from the gem (about 1 MB) and the
autoprefixer.js that's generated through build from the upstream repo
(about 8 MB) seems to be different. This is unexplained by the dev.
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>:
Bug#1009245; Package ruby-autoprefixer-rails.
(Tue, 03 May 2022 13:48:05 GMT) (full text, mbox, link).
Acknowledgement sent
to Pirate Praveen <praveen@onenetbeyond.org>:
Extra info received and forwarded to list. Copy sent to Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>.
(Tue, 03 May 2022 13:48:05 GMT) (full text, mbox, link).
Message #20 received at 1009245@bugs.debian.org (full text, mbox, reply):
On Tue, 12 Apr 2022 23:59:16 +0530 Akshay S Dinesh
<akshay@learnlearn.in> wrote:
> There is a possibility that this is related to the execjs version.
>
>
https://github.com/ai/autoprefixer-rails/issues/203#issuecomment-838512342
>
>
> On the other hand, the autoprefixer.js from the gem (about 1 MB) and
the
> autoprefixer.js that's generated through build from the upstream repo
> (about 8 MB) seems to be different. This is unexplained by the dev.
>
>
I think one of the build dependency with major version difference is
causing the broken build.
"@rollup/plugin-commonjs": "^17.0.0", vs 21.0.1+repack-1
"@rollup/plugin-node-resolve": "^11.0.1", vs 13.2.1+ds-1
"@rollup/plugin-replace": "^2.3.3", vs 3.0.0+ds+~2.2.0-1
We should try the upstream build with these newer versions and see if
the error can be reproduced.
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>:
Bug#1009245; Package ruby-autoprefixer-rails.
(Tue, 03 May 2022 14:39:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Akshay S Dinesh <akshay@learnlearn.in>:
Extra info received and forwarded to list. Copy sent to Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>.
(Tue, 03 May 2022 14:39:03 GMT) (full text, mbox, link).
Message #25 received at 1009245@bugs.debian.org (full text, mbox, reply):
>
> On the other hand, the autoprefixer.js from the gem (about 1 MB) and the
> autoprefixer.js that's generated through build from the upstream repo
> (about 8 MB) seems to be different. This is unexplained by the dev.
>
I was comparing an older version of the gem actually. Please ignore this
comment.
On the other hand, I have found that the node-resolve is somehow
resolving util.js from the system (/usr/share/nodejs) instead of
node_modules (possibly related to the patch we're applying) and that
causes process.env to be read directly (without handling it as if it is
inside browser)
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>:
Bug#1009245; Package ruby-autoprefixer-rails.
(Tue, 03 May 2022 15:57:05 GMT) (full text, mbox, link).
Acknowledgement sent
to Yadd <yadd@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>.
(Tue, 03 May 2022 15:57:05 GMT) (full text, mbox, link).
Message #30 received at 1009245@bugs.debian.org (full text, mbox, reply):
On 03/05/2022 15:46, Pirate Praveen wrote:
> On Tue, 12 Apr 2022 23:59:16 +0530 Akshay S Dinesh
> <akshay@learnlearn.in> wrote:
> > There is a possibility that this is related to the execjs version.
> >
> >
> https://github.com/ai/autoprefixer-rails/issues/203#issuecomment-838512342
> >
> >
> > On the other hand, the autoprefixer.js from the gem (about 1 MB) and the
> > autoprefixer.js that's generated through build from the upstream repo
> > (about 8 MB) seems to be different. This is unexplained by the dev.
> >
> >
>
> I think one of the build dependency with major version difference is
> causing the broken build.
>
> "@rollup/plugin-commonjs": "^17.0.0", vs 21.0.1+repack-1
> "@rollup/plugin-node-resolve": "^11.0.1", vs 13.2.1+ds-1
> "@rollup/plugin-replace": "^2.3.3", vs 3.0.0+ds+~2.2.0-1
>
> We should try the upstream build with these newer versions and see if
> the error can be reproduced.
I enabled test (uvu), passed. So JS part seems not broken.
The error "Cannot read property 'env' of undefined" seems related to
this line (generated vendor/autoprefixer.js):
> if (process.env.NODE_DEBUG) {
So I don't understand what is wrong here
It seems to have no test for ruby part:
> Run tests for ruby3.0: no test suite!
Maybe we can do something here ? "spec" directory seems related to ruby test
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>:
Bug#1009245; Package ruby-autoprefixer-rails.
(Wed, 04 May 2022 07:03:02 GMT) (full text, mbox, link).
Acknowledgement sent
to Pirate Praveen <praveen@onenetbeyond.org>:
Extra info received and forwarded to list. Copy sent to Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>.
(Wed, 04 May 2022 07:03:02 GMT) (full text, mbox, link).
Message #35 received at 1009245@bugs.debian.org (full text, mbox, reply):
2022, മേയ് 3 9:26:11 PM IST, Yadd <yadd@debian.org>ൽ എഴുതി
>On 03/05/2022 15:46, Pirate Praveen wrote:
>> On Tue, 12 Apr 2022 23:59:16 +0530 Akshay S Dinesh <akshay@learnlearn.in> wrote:
>> > There is a possibility that this is related to the execjs version.
>> >
>> > https://github.com/ai/autoprefixer-rails/issues/203#issuecomment-838512342
>> >
>> >
>> > On the other hand, the autoprefixer.js from the gem (about 1 MB) and the
>> > autoprefixer.js that's generated through build from the upstream repo
>> > (about 8 MB) seems to be different. This is unexplained by the dev.
>> >
>> >
>>
>> I think one of the build dependency with major version difference is causing the broken build.
>>
>> "@rollup/plugin-commonjs": "^17.0.0", vs 21.0.1+repack-1
>> "@rollup/plugin-node-resolve": "^11.0.1", vs 13.2.1+ds-1
>> "@rollup/plugin-replace": "^2.3.3", vs 3.0.0+ds+~2.2.0-1
>>
>> We should try the upstream build with these newer versions and see if the error can be reproduced.
>
>I enabled test (uvu), passed. So JS part seems not broken.
It works on nodejs env but I don't think it is testing in a browser environment.
>The error "Cannot read property 'env' of undefined" seems related to this line (generated vendor/autoprefixer.js):
>
>> if (process.env.NODE_DEBUG) {
>
>So I don't understand what is wrong here
Upstream build does not have this line. Akshay was mentioning wrong version of util.js was being used.
It seems the node-polyfills rollup plugin is not working as expected. These should be replaced for browser build.
>It seems to have no test for ruby part:
>
>> Run tests for ruby3.0: no test suite!
>
>Maybe we can do something here ? "spec" directory seems related to ruby test
We can try to enable it.
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>:
Bug#1009245; Package ruby-autoprefixer-rails.
(Wed, 04 May 2022 14:09:02 GMT) (full text, mbox, link).
Acknowledgement sent
to Pirate Praveen <praveen@onenetbeyond.org>:
Extra info received and forwarded to list. Copy sent to Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>.
(Wed, 04 May 2022 14:09:02 GMT) (full text, mbox, link).
Message #40 received at 1009245@bugs.debian.org (full text, mbox, reply):
On ബു, മേയ് 4 2022 at 12:29:22 വൈകു +0530 +0530,
Pirate Praveen <praveen@onenetbeyond.org> wrote:
>> The error "Cannot read property 'env' of undefined" seems related to
>> this line (generated vendor/autoprefixer.js):
>>
>>> if (process.env.NODE_DEBUG) {
>>
>> So I don't understand what is wrong here
>
> Upstream build does not have this line. Akshay was mentioning wrong
> version of util.js was being used.
>
> It seems the node-polyfills rollup plugin is not working as expected.
> These should be replaced for browser build.
>
Looks like this module is unmaintained so it is likely buggy with newer
nodejs releases (upstream may be still building with older nodejs)
https://github.com/ionic-team/rollup-plugin-node-polyfills/issues/28
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>:
Bug#1009245; Package ruby-autoprefixer-rails.
(Wed, 04 May 2022 14:12:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Pirate Praveen <praveen@onenetbeyond.org>:
Extra info received and forwarded to list. Copy sent to Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>.
(Wed, 04 May 2022 14:12:03 GMT) (full text, mbox, link).
Message #45 received at 1009245@bugs.debian.org (full text, mbox, reply):
On ബു, മേയ് 4 2022 at 07:35:14 വൈകു +0530 +0530,
Pirate Praveen <praveen@onenetbeyond.org> wrote:
>
>
> On ബു, മേയ് 4 2022 at 12:29:22 വൈകു +0530 +0530,
> Pirate Praveen <praveen@onenetbeyond.org> wrote:
>>> The error "Cannot read property 'env' of undefined" seems related
>>> to this line (generated vendor/autoprefixer.js):
>>>
>>>> if (process.env.NODE_DEBUG) {
>>>
>>> So I don't understand what is wrong here
>>
>> Upstream build does not have this line. Akshay was mentioning wrong
>> version of util.js was being used.
>>
>> It seems the node-polyfills rollup plugin is not working as
>> expected. These should be replaced for browser build.
>>
> Looks like this module is unmaintained so it is likely buggy with
> newer nodejs releases (upstream may be still building with older
> nodejs)
> https://github.com/ionic-team/rollup-plugin-node-polyfills/issues/28
>
In upstream bundle process.env.NODE_ENV is replaced by
browser$1.env.NODE_ENV !== 'production')
but our bundle still have process.env.NODE_ENV which indicates
rollup-plugin-node-polyfills is not working here.
Reply sent
to Pirate Praveen <praveen@debian.org>:
You have taken responsibility.
(Sun, 08 May 2022 16:24:03 GMT) (full text, mbox, link).
Notification sent
to Pirate Praveen <praveen@onenetbeyond.org>:
Bug acknowledged by developer.
(Sun, 08 May 2022 16:24:03 GMT) (full text, mbox, link).
Message #50 received at 1009245-close@bugs.debian.org (full text, mbox, reply):
Source: node-autoprefixer
Source-Version: 10.4.2.0+dfsg1+~cs24.8.4-2
Done: Pirate Praveen <praveen@debian.org>
We believe that the bug you reported is fixed in the latest version of
node-autoprefixer, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1009245@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Pirate Praveen <praveen@debian.org> (supplier of updated node-autoprefixer package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Sun, 08 May 2022 21:08:53 +0530
Source: node-autoprefixer
Architecture: source
Version: 10.4.2.0+dfsg1+~cs24.8.4-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>
Changed-By: Pirate Praveen <praveen@debian.org>
Closes: 998253 1009245
Changes:
node-autoprefixer (10.4.2.0+dfsg1+~cs24.8.4-2) unstable; urgency=medium
.
[ Akshay S Dinesh ]
* include /usr/share/nodejs in polyfills too (Closes: #1009245, #998253)
Checksums-Sha1:
5575dda718e2fb7176c5136a456e41d82bbd18b8 3931 node-autoprefixer_10.4.2.0+dfsg1+~cs24.8.4-2.dsc
3366876bd5f475cdbe8e98628a9789b2a426eb7b 7564 node-autoprefixer_10.4.2.0+dfsg1+~cs24.8.4-2.debian.tar.xz
3967243a48c5c68dbc4bfaf9bf1d46240111178e 14133 node-autoprefixer_10.4.2.0+dfsg1+~cs24.8.4-2_amd64.buildinfo
Checksums-Sha256:
ef894382ccdd997025c2370c1d6fe6b029ced582254637cf7a25372e02bb2e4c 3931 node-autoprefixer_10.4.2.0+dfsg1+~cs24.8.4-2.dsc
f20d65b34ccdf12daac9196bfa6792dfe88515cd22b1d7a0ec1679e83a489806 7564 node-autoprefixer_10.4.2.0+dfsg1+~cs24.8.4-2.debian.tar.xz
eb657ee1c9c2e8fd24826b4b8858cded2897d4a20f2010afab9fcdcd88025cea 14133 node-autoprefixer_10.4.2.0+dfsg1+~cs24.8.4-2_amd64.buildinfo
Files:
5d5b6a7ff95463a580edbc348cb15075 3931 javascript optional node-autoprefixer_10.4.2.0+dfsg1+~cs24.8.4-2.dsc
56c14a66792d018cef179bf8415db4eb 7564 javascript optional node-autoprefixer_10.4.2.0+dfsg1+~cs24.8.4-2.debian.tar.xz
2f8a442144a071681a0bca11e2105de3 14133 javascript optional node-autoprefixer_10.4.2.0+dfsg1+~cs24.8.4-2_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEE0whj4mAg5UP0cZqDj1PgGTspS3UFAmJ36gYACgkQj1PgGTsp
S3UF5A//fSN2eSjgokjHZKTHPF179zbO4lp58k8u1fUbIthS7s72xewdWuHzu5yC
VFxciEP1z+lIPbhFajNr22Tms4/3DdCbbOuY1enJnr9lI3QRpyt3kN7PvvDgzWCH
3nOajekq+jwNM/mNv6HYIrE2F8CYPvmRqOYSuLljq75jL91eNuSk7sjxW9ZPSeUB
PFRk4g02EApCAbvAEtaUOPaeRq9BmE/pastjkqWl8TepCyb4beO9Es8oP+JIdA6b
3V/8LGw/qn2L8XX28vNWd4nIfHskLhabEw+rqwAEUK4Ip3ZCBf+aO3UMUvWrS+sJ
OIqob2DxbFh5WshYGPpo22Z2y3X2hqO31zgEWyNKqdStXFIOmgxz/A25BFC0lIwo
F7Fh7K6L9UNqGTWDo6fOb8Zmt6HDOXzmZQ6+fLkG7+tmSCE9RJcwnGtnHCzzURP8
5Iqq/Bht9oHrwBwKus+8DY9YLUAdBz1CHuM2B16BlyAAi9Vi+n5xVMMFYboB04Dv
EAoRnjwbbWaO3tL3E4uGbtm0B2H6vddrLGXQUP9e0OGm/az7piAhAngr1FHNHDM/
3hXxxZbHjIZ0GoiAeFgxpSuvS5mK0imbY2o4/c7svnm+7i6pY3u8a6zIMoYP9dL4
QBOH5c6OqfyuznVmfyCcHuvSQBIdu9AUYcltKSbWNt0IDTCcynU=
=oxSf
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Mon, 06 Jun 2022 07:26:02 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Fri Jan 12 09:22:05 2024;
Machine Name:
bembo
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.