[Pkg-javascript-devel] Bug#1001631: pdf.js: FTBFS with webpack5: Error: Missing file or directory

Pirate Praveen praveen at onenetbeyond.org
Sat May 28 16:38:43 BST 2022


On Wed, 25 May 2022 01:38:45 +0530 Pirate Praveen 
<praveen at onenetbeyond.org> wrote:
 > Control: tags -1 help
 >
 > On Mon, 13 Dec 2021 14:20:37 +0100 Ayoyimika Ajibade
 > <ayoyimikaajibade at gmail.com> wrote:
 >  > Relevant part (hopefully):
 >  >
 >  > webpack 5.65.0 compiled successfully
 >  > [12:40:32] Finished '<anonymous>' after 1.32 min
 >  > [12:40:32] Finished 'minified-pre' after 1.32 min
 >  > [12:40:32] Starting '<anonymous>'...
 >  > [12:40:32] '<anonymous>' errored after 6.04 ms
 >  > [12:40:32] Error: ENOENT: no such file or directory, open
 >  > 'build/minified//build/pdf.js'
 >
 > This happens becuase the default output directory is dist/ and not ./
 >
 > So on the command line we have to pass --output-path
 > build/minified/build --output-filename pdf.js, we have to find the
 > equivalent in gulpfile.js

I made some progress in the build, some webpack builds now pass, still 
some more errors need fixing. Pushed my changes to salsa. Help is 
welcome to fix the remaining errors.

   debian/rules override_dh_auto_build
make[1]: Entering directory '/home/pravi/forge/js-team/pdf.js'
gulp dist-pre
[15:30:21] Local gulp not found in ~/forge/js-team/pdf.js
[15:30:21] Try running: npm install gulp
[15:30:21] Using globally installed gulp
postcss-calc: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
[15:30:22] Using gulpfile ~/forge/js-team/pdf.js/gulpfile.js
[15:30:22] Starting 'dist-pre'...
[15:30:22] Starting 'generic'...
[15:30:22] Starting 'createBuildNumber'...

### Getting extension build number
This is not a Git repository; using default build number.
Extension build number: 0
[15:30:22] Finished 'createBuildNumber' after 38 ms
[15:30:22] Starting 'locale'...

### Building localization files
[15:30:22] Finished 'locale' after 221 ms
[15:30:22] Starting 'scriptingGeneric'...

### Building default preferences
[15:30:24] asset pdf.scripting.js 102 KiB [emitted] (name: main)

webpack 5.65.0 compiled successfully
(node:22093) [DEP0005] DeprecationWarning: Buffer() is deprecated due 
to security and usability issues. Please use the Buffer.alloc(), 
Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was 
created)
[15:30:24] Finished 'scriptingGeneric' after 2.23 s
[15:30:24] Starting 'createGeneric'...

### Creating generic viewer
[BABEL] Note: The code generator has deoptimised the styling of 
/home/pravi/forge/js-team/pdf.js/external/quickjs/quickjs-eval.js as it 
exceeds the max of 500KB.
[15:30:30] asset pdf.sandbox.js 615 KiB [emitted] [big] (name: main) 1 
related asset

webpack 5.65.0 compiled successfully
[15:30:32] 'createGeneric' errored after 7.72 s
[15:30:32] Error in plugin "webpack-stream"
Message:
    Module build failed (from ./external/webpack/pdfjsdev-loader.js):
TypeError: this[type] is not a function
    at CodeGenerator.generateExpression 
(/usr/share/nodejs/escodegen/escodegen.js:2496:28)
    at /usr/share/nodejs/escodegen/escodegen.js:1129:38



More information about the Pkg-javascript-devel mailing list