[Pkg-javascript-devel] Bug#1002862: Bug#1002862: Bug#1002862: node-prop-types: FTBFS with webpack5: Error: Invalid webpack options

Pirate Praveen praveen at onenetbeyond.org
Fri Dec 31 10:57:28 GMT 2021



On വ്യാ, ഡിസം 30 2021 at 10:23:34 വൈകു +0530 
+0530, Pirate Praveen <praveen at onenetbeyond.org> wrote:
> 
> 
> On വ്യാ, ഡിസം 30 2021 at 12:17:58 വൈകു +0100 
> +0100, Ayoyimika Ajibade <ayoyimikaajibade at gmail.com> wrote:
>> Source: node-prop-types
>> Version: 15.7.2+~15.7.4-2
>> Severity: important
>> Justification: ftbfs
>> Tags: ftbfs
>> User: pkg-javascript-devel at 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-prop-types was found to fail to build in
>> that situation.
>> 
>> Relevant part (hopefully):
>> 
>> dpkg-buildpackage
>> -----------------
>> 
>> Command: dpkg-buildpackage --sanitize-env -us -uc -b -rfakeroot
>> dpkg-buildpackage: info: source package node-prop-types
>> dpkg-buildpackage: info: source version 15.7.2+~15.7.4-2
>> dpkg-buildpackage: info: source distribution unstable
>> dpkg-buildpackage: info: source changed by Jonas Smedegaard 
>> <dr at jones.dk>
>>  dpkg-source --before-build .
>> dpkg-buildpackage: info: host architecture amd64
>>  debian/rules clean
>> dh clean
>>    dh_auto_clean --buildsystem=nodejs
>>         rm -rf ./node_modules/.cache
>>         rm -rf types-prop-types/node_modules/.cache
>> rm ./node_modules/.cache
>> rm types-prop-types/node_modules/.cache
>> unlink node_modules/@types/prop-types
>>    dh_clean
>>  debian/rules binary
>> dh binary
>>    dh_update_autotools_config
>>    dh_autoreconf
>>    dh_auto_configure --buildsystem=nodejs
>> Link node_modules/@types/prop-types -> ../../types-prop-types
>>    debian/rules override_dh_auto_build
>> make[1]: Entering directory '/<<PKGBUILDDIR>>'
>> webpack --config debian/webpack.config.js --output-library=PropTypes 
>> \
>>         --entry index.js --output ./prop-types.js --mode development
>> [webpack-cli] Error: Unknown option '--output'
> 
> https://github.com/webpack/webpack-cli/blob/master/OPTIONS.md lists 
> all options of webpack 5.
> 
> This is probably the new option
> 
>  --output-filename <value>                                            
>              Specifies the filename template of output files on disk. 
> You must **not** specify an absolute path here, but the path may 
> contain folders separated by '/'! The specified path is joined with 
> the value of the 'output.path' option to determine the location on 
> disk.
> 
> See 
> https://stackoverflow.com/questions/65346490/how-to-specify-an-output-filename-with-the-webpack-cli
> 

diff --git a/debian/control b/debian/control
index f0080ab..755a2dc 100644
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,7 @@ Build-Depends:
  , node-object-assign
  , node-react
  , terser
- , webpack (>= 4~)
+ , webpack (>= 5~)
 Standards-Version: 4.6.0
 Vcs-Browser: https://salsa.debian.org/js-team/node-prop-types
 Vcs-Git: https://salsa.debian.org/js-team/node-prop-types.git
diff --git a/debian/rules b/debian/rules
index 42e2d84..c4a964b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,5 +6,5 @@

 override_dh_auto_build:
 	webpack --config debian/webpack.config.js --output-library=PropTypes \
-		--entry index.js --output ./prop-types.js --mode development
+		--entry index.js --output-filename ./prop-types.js --mode development
 	terser prop-types.js -o prop-types.min.js

After making these changes and building with experimental enabled, I 
get the following error

webpack --config debian/webpack.config.js --output-library=PropTypes \
	--entry index.js --output-filename ./prop-types.js --mode development
CLI for webpack must be installed.
  webpack-cli (https://github.com/webpack/webpack-cli)

We will use "yarn" to install the CLI via "yarn add -D webpack-cli".
Do you want to install 'webpack-cli' (yes/no): make[1]: *** 
[debian/rules:8: override_dh_auto_build] Error 1

Did you embed webpack-cli correctly? May be you need to patch in more 
places to find /usr/share/nodejs/webpack-cli

>> make[1]: *** [debian/rules:8: override_dh_auto_build] Error 1
>> make[1]: Leaving directory '/<<PKGBUILDDIR>>'
>> make: *** [debian/rules:5: binary] Error 2
>> dpkg-buildpackage: error: debian/rules binary subprocess returned 
>> exit
>> status 2
>> 
>> 
>> The full log is attached to this mail
>> --
>> Pkg-javascript-devel mailing list
>> Pkg-javascript-devel at alioth-lists.debian.net
>> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel
> 
> --
> Pkg-javascript-devel mailing list
> Pkg-javascript-devel at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel



More information about the Pkg-javascript-devel mailing list