We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build, serve, test
No response
Angular v15 CLI is not able to build and serve app if pdfjs-dist library is imported
npx @angular/cli@15 new admin-console
cd admin-console
npm install pdfjs-dist
npm ls pdfjs-dist
src/app/app.component.ts
import { Component } from '@angular/core'; import * as pdfjsLib from 'pdfjs-dist'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'], }) export class AppComponent { title = 'admin-console'; private initialize() { console.log(pdfjsLib.version); } }
npm run build
./node_modules/pdfjs-dist/build/pdf.js - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js): SyntaxError: /Users/prabh/dev/tmp/admin-console/node_modules/pdfjs-dist/build/pdf.js: Class private methods are not enabled. Please add `@babel/plugin-proposal-private-methods` to your configuration. 2591 | class PDFObjects { 2592 | #objs = Object.create(null); > 2593 | #ensureObj(objId) {
Angular CLI: 15.0.3 Node: 18.12.1 Package Manager: npm 8.19.3 OS: darwin arm64 Angular: 15.0.3 ... animations, cli, common, compiler, compiler-cli, core, forms ... platform-browser, platform-browser-dynamic, router Package Version --------------------------------------------------------- @angular-devkit/architect 0.1500.3 @angular-devkit/build-angular 15.0.3 @angular-devkit/core 15.0.3 @angular-devkit/schematics 15.0.3 @schematics/angular 15.0.3 rxjs 7.5.7 typescript 4.8.4
The text was updated successfully, but these errors were encountered:
Duplicate of #24426
Sorry, something went wrong.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
No branches or pull requests
Command
build, serve, test
Is this a regression?
The previous version in which this bug was not present was
No response
Description
Angular v15 CLI is not able to build and serve app if pdfjs-dist library is imported
Minimal Reproduction
npx @angular/cli@15 new admin-console
cd admin-console
npm install pdfjs-dist
npm ls pdfjs-dist
-> 3.1.81src/app/app.component.ts
and update the file with this codenpm run build
Exception or Error
Your Environment
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: