[Pkg-javascript-devel] Bug#1009245: ruby-autoprefixer-rails: broken build (TypeError: Cannot read property 'env' of undefined)

Pirate Praveen praveen at onenetbeyond.org
Wed May 4 07:59:22 BST 2022



2022, മേയ് 3 9:26:11 PM IST, Yadd <yadd at debian.org>ൽ എഴുതി
>On 03/05/2022 15:46, Pirate Praveen wrote:
>> On Tue, 12 Apr 2022 23:59:16 +0530 Akshay S Dinesh <akshay at 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.



More information about the Pkg-javascript-devel mailing list