#1001392 node-axios: FTBFS with webpack5: Invalid

Package:
src:node-axios
Source:
node-axios
Submitter:
Ayoyimika Ajibade
Date:
2022-05-23 06:09:03 UTC
Severity:
serious
Tags:
#1001392#5
Date:
2021-12-09 14:49:26 UTC
From:
To:
Version: 0.24.0+dfsg-1

Severity: important

Justification: ftbfs

Tags: ftbfs

User:pkg-javascript-devel@alioth-lists.debian.net

Usertags: webpack5


Hi,

We are starting to build against webpack5 in experimental and the
package needed for local build is webpack and node-webpack-source from
experimental.
During a test rebuild, node-axios was found to fail to build in that
situation

Relevant part (hopefully):


    debian/rules override_dh_auto_build
make[1]: Entering directory '/<<PKGBUILDDIR>>'
grunt build
Loading "webpack.js" tasks...ERROR
 >> Error: Cannot find module 'webpack/lib/CachePlugin'
 >> Require stack:
 >> - /usr/share/nodejs/grunt-webpack/src/plugins/CachePluginFactory.js
 >> - /usr/share/nodejs/grunt-webpack/tasks/webpack.js
 >> - /usr/share/nodejs/grunt/lib/grunt/task.js
 >> - /usr/share/nodejs/grunt/lib/grunt.js
 >> - /usr/share/nodejs/grunt-cli/bin/grunt
Loading "Gruntfile.js" tasks...ERROR
 >> Error: Cannot find module 'uglifyjs-webpack-plugin'
 >> Require stack:
 >> - /<<PKGBUILDDIR>>/webpack.config.js
 >> - /<<PKGBUILDDIR>>/Gruntfile.js
 >> - /usr/share/nodejs/grunt/lib/grunt/task.js
 >> - /usr/share/nodejs/grunt/lib/grunt.js
 >> - /usr/share/nodejs/grunt-cli/bin/grunt
Warning: Task "build" not found. Use --force to continue.

Aborted due to warnings.
make[1]: *** [debian/rules:11: override_dh_auto_build] Error 3
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:8: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit
status 2

The full log is attached to this mail

#1001392#16
Date:
2022-01-15 14:35:21 UTC
From:
To:
After installing node-uglifyjs-webpack-plugin package i am faced with
another error as the source package using webpack3 has not migrated to
webpack5.

Here is the new error message:

    debian/rules override_dh_auto_build
make[1]: Entering directory
'/home/ayoyimika/debian-js-packaging/axios/node-axios'
grunt build
Running "clean:dist" (clean) task
 >> 0 paths cleaned.

Running "webpack" task
10% building 0/1 entries 0/0 dependencies 0/0 modules(node:19516)
[DEP_WEBPACK_COMPILATION_OPTIMIZE_CHUNK_ASSETS] DeprecationWarning:
optimizeChunkAssets is deprecated (use Compilation.hooks.processAssets
instead and use one of Compilation.PROCESS_ASSETS_STAGE_* as stage option)
92% sealing asset processing UglifyJSPlugin(node:19516)
[DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET] DeprecationWarning:
Compilation.chunks was changed from Array to Set (using Array method
'reduce' is deprecated)
(node:19516) [DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET_LENGTH]
DeprecationWarning: chunk.files was changed from Array to Set (using
Array property 'length' is deprecated)
(node:19516) [DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET_INDEXER]
DeprecationWarning: chunk.files was changed from Array to Set (indexing
Array is deprecated)
99% cache begin idleasset axios.js 99 bytes [emitted] (name: main)

ERROR in main
Module not found: Error: Recursion in resolving
Stack:
   undefined: (/home/ayoyimika/debian-js-packaging/axios/node-axios)
./index.js

webpack 5.65.0 compiled with 1 error in 446 ms
Warning:  Use --force to continue.

Aborted due to warnings.
make[1]: *** [debian/rules:11: override_dh_auto_build] Error 3
make[1]: Leaving directory
'/home/ayoyimika/debian-js-packaging/axios/node-axios'
make: *** [debian/rules:8: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit
status 2

The full log is attached to this mail

#1001392#21
Date:
2022-01-18 21:39:10 UTC
From:
To:
Updating node-axios webpack dependency to version 5 using the PR from a
contributor https://github.com/axios/axios/pull/4351/commits resulted to
a similar error as its previous bug report here

  debian/rules binary
dh binary
    dh_update_autotools_config
    dh_autoreconf
    dh_auto_configure --buildsystem=nodejs
Link ./node_modules/grunt-contrib-clean ->
/usr/share/nodejs/grunt-contrib-clean
Link ./node_modules/grunt-webpack -> /usr/share/nodejs/grunt-webpack
    debian/rules override_dh_auto_build
make[1]: Entering directory
'/home/ayoyimika/debian-js-packaging/axios/node-axios'
grunt build
Running "clean:dist" (clean) task
 >> 0 paths cleaned.

Running "webpack" task
99% cache begin idleasset axios.js 99 bytes [emitted] (name: main)

ERROR in main
Module not found: Error: Recursion in resolving
Stack:
   undefined: (/home/ayoyimika/debian-js-packaging/axios/node-axios)
/home/ayoyimika/debian-js-packaging/axios/node-axios/index.js

webpack 5.65.0 compiled with 1 error in 467 ms
Warning:  Use --force to continue.

Aborted due to warnings.
make[1]: *** [debian/rules:11: override_dh_auto_build] Error 3
make[1]: Leaving directory
'/home/ayoyimika/debian-js-packaging/axios/node-axios'
make: *** [debian/rules:8: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit
status 2

#1001392#26
Date:
2022-05-23 04:17:10 UTC
From:
To:
On Tue, 18 Jan 2022 22:39:10 +0100 Ayoyimika Ajibade  <ayoyimikaajibade@gmail.com> wrote:
 > Updating node-axios webpack dependency to version 5 using the PR
from a
 > contributor https://github.com/axios/axios/pull/4351/commits
resulted to
 > a similar error as its previous bug report here
 >
 >   debian/rules binary
 > dh binary
 >     dh_update_autotools_config
 >     dh_autoreconf
 >     dh_auto_configure --buildsystem=nodejs
 > Link ./node_modules/grunt-contrib-clean ->
 > /usr/share/nodejs/grunt-contrib-clean
 > Link ./node_modules/grunt-webpack -> /usr/share/nodejs/grunt-webpack
 >     debian/rules override_dh_auto_build
 > make[1]: Entering directory
 > '/home/ayoyimika/debian-js-packaging/axios/node-axios'
 > grunt build
 > Running "clean:dist" (clean) task
 >  >> 0 paths cleaned.
 >
 > Running "webpack" task
 > 99% cache begin idleasset axios.js 99 bytes [emitted] (name: main)
 >
 > ERROR in main
 > Module not found: Error: Recursion in resolving

This error is caused by older version of node-tapable. Currently this
fails with

grunt build
Running "clean:dist" (clean) task
 >> 0 paths cleaned.

Running "webpack" task
Warning: Invalid configuration object. Webpack has been initialized
using a configuration object that does not match the API schema.
 - configuration.node has an unknown property 'process'. These
properties are valid:
   object { __dirname?, __filename?, global? }
   -> Options object for node compatibility features. Use --force to
continue.

Aborted due to warnings.

#1001392#35
Date:
2022-05-23 06:05:44 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
node-axios, 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 1001392@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-axios 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)
Format: 1.8
Date: Mon, 23 May 2022 10:18:20 +0530
Source: node-axios
Architecture: source
Version: 0.26.1+dfsg-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>
Changed-By: Pirate Praveen <praveen@debian.org>
Closes: 1001392
Changes:
 node-axios (0.26.1+dfsg-2) unstable; urgency=medium
 .
   * Switch to webpack 5 and remove node-uglifyjs-webpack-plugin
     (Closes: #1001392)
   * Bump Standards-Version to 4.6.1 (no changes needed)
Checksums-Sha1:
 c23c9f9ae36fe478d35138eac5ba55bf2b997c3c 2284 node-axios_0.26.1+dfsg-2.dsc
 8cb96632cbb7a42a789a9103f5d222307531f5a3 5124 node-axios_0.26.1+dfsg-2.debian.tar.xz
 1d92a877cabfafc4c3701f064bc9ab71030a64d8 18013 node-axios_0.26.1+dfsg-2_amd64.buildinfo
Checksums-Sha256:
 896b477e61fafbccc14537082ffd2619bd5372126f35d7cd725e528ee9bac804 2284 node-axios_0.26.1+dfsg-2.dsc
 af768ef1932849202a22ad1609566dd2b38d15c0c980e51d9ce64f500987b8b7 5124 node-axios_0.26.1+dfsg-2.debian.tar.xz
 850a39b86db8bf3711fa909eaef4245503fb05a84e555c2494c7bbda0d838692 18013 node-axios_0.26.1+dfsg-2_amd64.buildinfo
Files:
 cb666f40ae8b3bb9a1ed0954bd766d65 2284 javascript optional node-axios_0.26.1+dfsg-2.dsc
 18dc0120c316f0df70ffe6bd8d73898e 5124 javascript optional node-axios_0.26.1+dfsg-2.debian.tar.xz
 eafe8ff83f3caf104b0dfe405cb37aab 18013 javascript optional node-axios_0.26.1+dfsg-2_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE0whj4mAg5UP0cZqDj1PgGTspS3UFAmKLIOEACgkQj1PgGTsp
S3XS8xAAumFF15s9kSw/UiC7fCcakiaAS05ERpC0es/Pp2TdWaDIrEwRlfxccqwn
yXtSVxAY6Eru6hx6wlvsSVYLSwiYa89sEw4F9NQ/LS/dkqGFlGALsj0EdteamxUU
XMbzwCaiZwsd+GV/37kRsHXMaGzItUOpvVTW6X4nxxzmm0ydf3m7eM8O4l4r/Ocb
vx6NqaPnnGpJxXmQBM/dtw+Onv9pfG2r3ZbsjzNyqTXnG7oz4zc0rkxiud9Da08B
SRJzMgY7YmYGhI9ZBvRKCZsvNYRVYk0l5pEQMGAMTGKAGYNE2RFXgUHDdukTXxnF
0EP/u4Q9R4ekwGR5lOgEBOS7Us0KpO+ivdkVanESSFvUjMk8l+5oDM1zgydYNLor
/4Z4lXVBqDGC1c0dJvgXmVvLhiuy7D7l2amvHAH+b2WqWiYXPGqR3NTtfUxsCFIZ
3roxQQfT2wKxiUT5qt8QJshmHJgP2w7lal03R2KGuza9mvGegFDQGDscIiIxZpEu
N1mtceTaU7jjOTy0PW5ZC27C5410gLNSmrPg5RhK55dS4mHuH7kTsl5f/803aXAT
TMFTFLFA9VC/8E4Vi/D39UMfTgjywuF1puU+axrER+B04h1WleUFakyLrzGQwQIJ
OdYQTGmH9mi3/F1HITGfqGngjIImg5i3XvPkIiL2ZysW/sEKDD0=
=KJXj
-----END PGP SIGNATURE-----