Error: command "npm" with parameters "install,build/dist/" exited with code 1
See original GitHub issueAttach (recommended) or Link to PDF file here: none
Configuration:
- Web browser and its version: 104.0.5112.101
- Operating system and its version: macOS 12.4
- PDF.js version: v2.16.105
- Is a browser extension:
Steps to reproduce the problem:
- I can open http://localhost:8888/web/viewer.html successfully following the instructions in https://github.com/mozilla/pdf.js#getting-the-code
- Next I want to see some examples in https://github.com/mozilla/pdf.js/tree/master/examples/browserify#getting-started. When I run
gulp dist-install
, I got this:
(base) cuiyc@cuiycdeMacBook-Pro pdf.js % sudo gulp dist-install
Password:
[12:58:35] Using gulpfile ~/DLTribe/pdf.js/gulpfile.js
[12:58:35] Starting 'dist-install'...
[12:58:35] Starting 'dist-pre'...
[12:58:35] Starting 'generic'...
[12:58:35] Starting 'createBuildNumber'...
### Getting extension build number
This is not a Git repository; using default build number.
Extension build number: 0
[12:58:35] Finished 'createBuildNumber' after 22 ms
[12:58:35] Starting 'locale'...
### Building localization files
[12:58:35] Finished 'locale' after 79 ms
[12:58:35] Starting 'scriptingGeneric'...
### Building default preferences
[12:58:36] asset pdf.scripting.js 105 KiB [emitted] (name: main)
webpack 5.74.0 compiled successfully
[12:58:36] Finished 'scriptingGeneric' after 700 ms
[12:58:36] Starting 'createGeneric'...
### Creating generic viewer
[BABEL] Note: The code generator has deoptimised the styling of /Users/cuiyc/DLTribe/pdf.js/external/quickjs/quickjs-eval.js as it exceeds the max of 500KB.
[12:58:38] asset pdf.sandbox.js 616 KiB [emitted] [big] (name: main) 1 related asset
webpack 5.74.0 compiled successfully
[12:58:40] asset viewer.js 416 KiB [emitted] [big] (name: main) 1 related asset
webpack 5.74.0 compiled successfully
[12:58:41] asset pdf.js 490 KiB [emitted] [big] (name: main) 1 related asset
webpack 5.74.0 compiled successfully
[12:58:41] asset pdf.worker.js 1.88 MiB [emitted] [big] (name: main) 1 related asset
webpack 5.74.0 compiled successfully
[12:58:41] Finished 'createGeneric' after 5.16 s
[12:58:41] Finished 'generic' after 5.96 s
[12:58:41] Starting 'generic-legacy'...
[12:58:41] Starting 'createBuildNumber'...
### Getting extension build number
This is not a Git repository; using default build number.
Extension build number: 0
[12:58:41] Finished 'createBuildNumber' after 22 ms
[12:58:41] Starting 'locale'...
### Building localization files
[12:58:41] Finished 'locale' after 48 ms
[12:58:41] Starting 'scriptingGenericLegacy'...
### Building default preferences
[12:58:41] asset pdf.scripting.js 109 KiB [emitted] (name: main)
webpack 5.74.0 compiled successfully
[12:58:41] Finished 'scriptingGenericLegacy' after 227 ms
[12:58:41] Starting 'createGenericLegacy'...
### Creating generic (legacy) viewer
[BABEL] Note: The code generator has deoptimised the styling of /Users/cuiyc/DLTribe/pdf.js/external/quickjs/quickjs-eval.js as it exceeds the max of 500KB.
[12:58:43] asset pdf.sandbox.js 621 KiB [emitted] [big] (name: main) 1 related asset
webpack 5.74.0 compiled successfully
[12:58:46] asset viewer.js 509 KiB [emitted] [big] (name: main) 1 related asset
webpack 5.74.0 compiled successfully
[12:58:47] asset pdf.js 655 KiB [emitted] [big] (name: main) 1 related asset
webpack 5.74.0 compiled successfully
[12:58:47] asset pdf.worker.js 1.98 MiB [emitted] [big] (name: main) 1 related asset
webpack 5.74.0 compiled successfully
[12:58:47] Finished 'createGenericLegacy' after 5.25 s
[12:58:47] Finished 'generic-legacy' after 5.55 s
[12:58:47] Starting 'components'...
[12:58:47] Starting 'createBuildNumber'...
### Getting extension build number
This is not a Git repository; using default build number.
Extension build number: 0
[12:58:47] Finished 'createBuildNumber' after 21 ms
[12:58:47] Starting 'createComponents'...
### Creating generic components
[12:58:47] asset pdf_viewer.js 224 KiB [emitted] (name: main) 1 related asset
webpack 5.74.0 compiled successfully
[12:58:47] Finished 'createComponents' after 382 ms
[12:58:47] Finished 'components' after 404 ms
[12:58:47] Starting 'components-legacy'...
[12:58:47] Starting 'createBuildNumber'...
### Getting extension build number
This is not a Git repository; using default build number.
Extension build number: 0
[12:58:47] Finished 'createBuildNumber' after 20 ms
[12:58:47] Starting 'createComponentsLegacy'...
### Creating generic (legacy) components
[12:58:48] asset pdf_viewer.js 260 KiB [emitted] [big] (name: main) 1 related asset
webpack 5.74.0 compiled successfully
[12:58:48] Finished 'createComponentsLegacy' after 418 ms
[12:58:48] Finished 'components-legacy' after 439 ms
[12:58:48] Starting 'image_decoders'...
[12:58:48] Starting 'createBuildNumber'...
### Getting extension build number
This is not a Git repository; using default build number.
Extension build number: 0
[12:58:48] Finished 'createBuildNumber' after 20 ms
[12:58:48] Starting 'createImageDecoders'...
### Creating image decoders
[12:58:48] asset pdf.image_decoders.js 242 KiB [emitted] (name: main) 1 related asset
webpack 5.74.0 compiled successfully
[12:58:48] Finished 'createImageDecoders' after 465 ms
[12:58:48] Finished 'image_decoders' after 485 ms
[12:58:48] Starting 'image_decoders-legacy'...
[12:58:48] Starting 'createBuildNumber'...
### Getting extension build number
This is not a Git repository; using default build number.
Extension build number: 0
[12:58:48] Finished 'createBuildNumber' after 20 ms
[12:58:48] Starting 'createImageDecodersLegacy'...
### Creating (legacy) image decoders
[12:58:49] asset pdf.image_decoders.js 291 KiB [emitted] [big] (name: main) 1 related asset
webpack 5.74.0 compiled successfully
[12:58:49] Finished 'createImageDecodersLegacy' after 488 ms
[12:58:49] Finished 'image_decoders-legacy' after 508 ms
[12:58:49] Starting 'lib'...
[12:58:49] Starting 'createBuildNumber'...
### Getting extension build number
This is not a Git repository; using default build number.
Extension build number: 0
[12:58:49] Finished 'createBuildNumber' after 20 ms
[12:58:49] Starting 'scriptingLib'...
### Building default preferences
[12:58:49] asset pdf.scripting.js 105 KiB [emitted] (name: main)
webpack 5.74.0 compiled successfully
[12:58:49] Finished 'scriptingLib' after 166 ms
[12:58:49] Starting 'createLib'...
[BABEL] Note: The code generator has deoptimised the styling of /Users/cuiyc/DLTribe/pdf.js/external/quickjs/quickjs-eval.js as it exceeds the max of 500KB.
[12:58:50] asset pdf.sandbox.js 616 KiB [emitted] [big] (name: main)
webpack 5.74.0 compiled successfully
[12:58:52] Finished 'createLib' after 3.01 s
[12:58:52] Finished 'lib' after 3.2 s
[12:58:52] Starting 'minified'...
[12:58:52] Starting 'createBuildNumber'...
### Getting extension build number
This is not a Git repository; using default build number.
Extension build number: 0
[12:58:52] Finished 'createBuildNumber' after 23 ms
[12:58:52] Starting 'locale'...
### Building localization files
[12:58:52] Finished 'locale' after 48 ms
[12:58:52] Starting 'scriptingMinified'...
### Building default preferences
[12:58:52] asset pdf.scripting.js 105 KiB [emitted] (name: main)
webpack 5.74.0 compiled successfully
[12:58:52] Finished 'scriptingMinified' after 161 ms
[12:58:52] Starting 'createMinified'...
### Creating minified viewer
[BABEL] Note: The code generator has deoptimised the styling of /Users/cuiyc/DLTribe/pdf.js/external/quickjs/quickjs-eval.js as it exceeds the max of 500KB.
[12:58:54] asset pdf.sandbox.js 616 KiB [emitted] [big] (name: main) 1 related asset
webpack 5.74.0 compiled successfully
[12:58:55] asset pdf.image_decoders.js 242 KiB [emitted] (name: main) 1 related asset
webpack 5.74.0 compiled successfully
[12:58:56] asset viewer.js 416 KiB [emitted] [big] (name: main) 1 related asset
webpack 5.74.0 compiled successfully
[12:58:57] asset pdf.js 490 KiB [emitted] [big] (name: main) 1 related asset
webpack 5.74.0 compiled successfully
[12:58:57] asset pdf.worker.js 1.88 MiB [emitted] [big] (name: main) 1 related asset
webpack 5.74.0 compiled successfully
[12:58:57] Finished 'createMinified' after 5 s
[12:58:57] Starting 'compressMinified'...
### Minifying js files
### Cleaning js files
[12:59:02] Finished 'compressMinified' after 4.72 s
[12:59:02] Finished 'minified' after 9.95 s
[12:59:02] Starting 'minified-legacy'...
[12:59:02] Starting 'createBuildNumber'...
### Getting extension build number
This is not a Git repository; using default build number.
Extension build number: 0
[12:59:02] Finished 'createBuildNumber' after 30 ms
[12:59:02] Starting 'locale'...
### Building localization files
[12:59:02] Finished 'locale' after 44 ms
[12:59:02] Starting 'scriptingMinifiedLegacy'...
### Building default preferences
[12:59:02] asset pdf.scripting.js 109 KiB [emitted] (name: main)
webpack 5.74.0 compiled successfully
[12:59:02] Finished 'scriptingMinifiedLegacy' after 196 ms
[12:59:02] Starting 'createMinifiedLegacy'...
### Creating minified (legacy) viewer
[BABEL] Note: The code generator has deoptimised the styling of /Users/cuiyc/DLTribe/pdf.js/external/quickjs/quickjs-eval.js as it exceeds the max of 500KB.
[12:59:04] asset pdf.sandbox.js 621 KiB [emitted] [big] (name: main) 1 related asset
webpack 5.74.0 compiled successfully
[12:59:06] asset viewer.js 509 KiB [emitted] [big] (name: main) 1 related asset
webpack 5.74.0 compiled successfully
[12:59:07] asset pdf.js 655 KiB [emitted] [big] (name: main) 1 related asset
webpack 5.74.0 compiled successfully
[12:59:08] asset pdf.worker.js 1.98 MiB [emitted] [big] (name: main) 1 related asset
webpack 5.74.0 compiled successfully
[12:59:08] asset pdf.image_decoders.js 291 KiB [emitted] [big] (name: main) 1 related asset
webpack 5.74.0 compiled successfully
[12:59:08] Finished 'createMinifiedLegacy' after 5.69 s
[12:59:08] Starting 'compressMinifiedLegacy'...
### Minifying js files
### Cleaning js files
[12:59:12] Finished 'compressMinifiedLegacy' after 4.74 s
[12:59:12] Finished 'minified-legacy' after 11 s
[12:59:12] Starting 'types'...
### Generating TypeScript definitions using `tsc`
[12:59:15] Finished 'types' after 2.46 s
[12:59:15] Starting 'createDist'...
### Cloning baseline distribution
### Overwriting all files
[12:59:28] Finished 'createDist' after 13 s
[12:59:28] Finished 'dist-pre' after 53 s
[12:59:28] Starting 'createDistInstall'...
Error: command "npm" with parameters "install,build/dist/" exited with code 1
[12:59:35] The following tasks did not complete: dist-install, createDistInstall
[12:59:35] Did you forget to signal async completion?
What went wrong? (add screenshot)
Error: command "npm" with parameters "install,build/dist/" exited with code 1
[12:59:35] The following tasks did not complete: dist-install, createDistInstall
[12:59:35] Did you forget to signal async completion?
I google it and I found some solutions like https://stackoverflow.com/questions/36897877/gulp-error-the-following-tasks-did-not-complete-did-you-forget-to-signal-async. But it doesn’t help.
Node version : v16.16.0 gulp CLI version: 2.3.0 gulp Local version: 4.0.2
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
'The command "npm install" exited with code 1' error when ...
This error log points out what's happening: npm install npm ERR! code EJSONPARSE npm ERR! file ...
Read more >Error MSB3073 The command "npm run build" exited with ...
The error I faced on visual studio during the build was the below. "npm run build" exited with code 1 - Visual Studio...
Read more >tsc-watch - npm
The nodemon for TypeScript. tsc-watch starts a TypeScript compiler with --watch parameter, with the ability to react to compilation status.
Read more >Command failed with exit code 1: npm run build - Netlify fix 2020
Udemy Courses:- 9 React Projects on Udemy - https://bit.ly/2D83M8c- 9 React Projects on Gumroad ...
Read more >Npm@1 - npm v1 task - Microsoft Learn
Install and publish npm packages, or run an npm command. Supports npmjs.com and authenticated registries like Azure Artifacts.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Snuffleupagus Problem solved. I tried the error command
npm install build/dist
, turned out I got:It seems that npm recognized the command to clone a repository. So I changed the demo:
Finally:
@Snuffleupagus , I have tried both methods including
git clone
command and downloading the zip file. Actually, one command is differnet, it’snpm install
. I have to usenpm install --force
to bypass the conflict(one solution found in stackoverflow). Should I have to usenpm install
?git clone https://github.com/mozilla/pdf.js.git
npm install met error
So I tried npm install --force
gulp dist-install