Processed: Re: [Pkg-javascript-devel] Bug#970550: Bug#970550: replacing browserify with webpack or rollup - need help
Processing control commands: > tag -1 pending Bug #970550 [libjs-autoprefixer] diaspora installation fails with ExecJS::ProgramError: TypeError: Cannot read property 'list' of undefined Added tag(s) pending. -- 970550: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=970550 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems
Bug#970550: [Pkg-javascript-devel] Bug#970550: Bug#970550: replacing browserify with webpack or rollup - need help
Control: tag -1 pending On 2020, സെപ്റ്റംബർ 24 5:13:53 PM IST, Pirate Praveen wrote: >After trying different options of both webpack and rollup, finally >found this >https://github.com/ai/autoprefixer-rails/blob/master/build/rollup.config.js > >I will try using this now. Jishnu found out our build does not include postcss and we are now able to build the correct bundle with postcss. I have confirmed the problem is fixed with the new build in diaspora. -- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Bug#970550: [Pkg-javascript-devel] Bug#970550: Bug#970550: replacing browserify with webpack or rollup - need help
On Sun, Sep 20, 2020 at 16:10, Pirate Praveen wrote: On Sun, Sep 20, 2020 at 15:51, Nilesh Patra wrote: I've seen these almost same buffer based errors before - with webpack specifically - and manually creating a symlink helped. I did the same in this case and the build passes with "Buffer: true" I've pushed the commit to the same webpack branch Could you take a look and let me know if it made the situation better/worse? diaspora still fails at rake assets:precompile step with same error. I suspected it has something to do with version of buffer we have. libs-browser has buffer 4.3.0 in package.json but we have node-buffer 5.x. But even with buffer 4.9.2 embedded, it fails the same way. After trying different options of both webpack and rollup, finally found this https://github.com/ai/autoprefixer-rails/blob/master/build/rollup.config.js I will try using this now.
Bug#970550: [Pkg-javascript-devel] Bug#970550: replacing browserify with webpack or rollup - need help
On Sun, Sep 20, 2020 at 15:51, Nilesh Patra wrote: I've seen these almost same buffer based errors before - with webpack specifically - and manually creating a symlink helped. I did the same in this case and the build passes with "Buffer: true" I've pushed the commit to the same webpack branch Could you take a look and let me know if it made the situation better/worse? diaspora still fails at rake assets:precompile step with same error. I suspected it has something to do with version of buffer we have. libs-browser has buffer 4.3.0 in package.json but we have node-buffer 5.x. But even with buffer 4.9.2 embedded, it fails the same way.
Bug#970550: [Pkg-javascript-devel] Bug#970550: replacing browserify with webpack or rollup - need help
Hi, On Sun, 20 Sep 2020 at 15:18, Pirate Praveen wrote: > Control: tags -1 help > > On Sun, Sep 20, 2020 at 14:44, Pirate Praveen > wrote: > > 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) > > rollup-plugin-node-builtins is not packaged in debian. So I decided to > try webpack (code pushed to a separate branch 'webpack'), > > This has resulted in a situation where we need to handle Buffer > correctyly. > > with Buffer: true in webpack.config.js, the build fails with error > > ERROR in /usr/share/nodejs/postcss/lib/map-generator.js > Module not found: Error: Can't resolve > './../../../../../<>/buffer' in > '/usr/share/nodejs/postcss/lib' > @ /usr/share/nodejs/postcss/lib/map-generator.js 1:0-89 > @ /usr/share/nodejs/postcss/lib/lazy-result.js > @ /usr/share/nodejs/postcss/lib/processor.js > @ /usr/share/nodejs/postcss/lib/postcss.js > @ ./lib/autoprefixer.js > I've seen these almost same buffer based errors before - with webpack specifically - and manually creating a symlink helped. I did the same in this case and the build passes with "Buffer: true" I've pushed the commit to the same webpack branch Could you take a look and let me know if it made the situation better/worse? Thanks and Regards, Nilesh
Bug#970550: replacing browserify with webpack or rollup - need help
Control: tags -1 help On Sun, Sep 20, 2020 at 14:44, Pirate Praveen wrote: 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) rollup-plugin-node-builtins is not packaged in debian. So I decided to try webpack (code pushed to a separate branch 'webpack'), This has resulted in a situation where we need to handle Buffer correctyly. with Buffer: true in webpack.config.js, the build fails with error ERROR in /usr/share/nodejs/postcss/lib/map-generator.js Module not found: Error: Can't resolve './../../../../../<>/buffer' in '/usr/share/nodejs/postcss/lib' @ /usr/share/nodejs/postcss/lib/map-generator.js 1:0-89 @ /usr/share/nodejs/postcss/lib/lazy-result.js @ /usr/share/nodejs/postcss/lib/processor.js @ /usr/share/nodejs/postcss/lib/postcss.js @ ./lib/autoprefixer.js with Buffer: "mock" or Buffer: false, the build passes, but now rake assets:precompile in diaspora fails with the following error root@diaspora-buster-main:/usr/share/diaspora# sudo -u diaspora -E -H bundle exec rake assets:precompile rake aborted! ExecJS::RuntimeError: /tmp/execjs20200920-897-qyh1s1js:87 process.stdout.write('' + string); ^ TypeError: Cannot read property 'write' of undefined at print (/tmp/execjs20200920-897-qyh1s1js:87:20) at /tmp/execjs20200920-897-qyh1s1js:101:5 at /tmp/execjs20200920-897-qyh1s1js:1:40 at Object. (/tmp/execjs20200920-897-qyh1s1js:1:58) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) /usr/share/diaspora/app/assets/config/manifest.js:9 (execjs):87 /usr/share/rubygems-integration/all/gems/autoprefixer-rails-8.6.5/lib/autoprefixer-rails/processor.rb:153:in `runtime' /usr/share/rubygems-integration/all/gems/autoprefixer-rails-8.6.5/lib/autoprefixer-rails/processor.rb:37:in `process' /usr/share/rubygems-integration/all/gems/autoprefixer-rails-8.6.5/lib/autoprefixer-rails/sprockets.rb:20:in `run' /usr/share/rubygems-integration/all/gems/autoprefixer-rails-8.6.5/lib/autoprefixer-rails/sprockets.rb:14:in `call' /usr/share/rubygems-integration/all/gems/rake-13.0.1/exe/rake:27:in `' Tasks: TOP => assets:precompile (See full trace by running task with --trace) root@diaspora-buster-main:/usr/share/diaspora# libraryTarget="window", libraryTrget="umd" was also tried without success. Packaging rollup-plugin-node-builtins may be one option. Any ideas?