question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ERROR in node_modules/ng2-pdf-viewer/src/app/pdf-viewer/pdf-viewer.component.d.ts:5:13 - error TS1005: '=' expected.

See original GitHub issue
Bug Report or Feature Request (mark with an x)
- [ ] Regression (a behavior that used to work and stopped working in a new release)
- [X ] Bug report -> please search issues before submitting
- [ ] Feature request
- [ ] Documentation issue or request

I have this bugs when I try to use the plugin:

ERROR in node_modules/ng2-pdf-viewer/src/app/pdf-viewer/pdf-viewer.component.d.ts:5:13 - error TS1005: ‘=’ expected.

5 import type { PDFSource, PDFProgressData } from ‘./typings’; ~ node_modules/ng2-pdf-viewer/src/app/pdf-viewer/pdf-viewer.component.d.ts:5:49 - error TS1005: ‘;’ expected.

5 import type { PDFSource, PDFProgressData } from ‘./typings’;

“rxjs”: “6.5.4”, “typescript”: “^3.7.5”

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
VadimDezcommented, May 21, 2021

That’s what I thought! Starting version 7.0.0 ng2-pdf-viewer uses tslib ^2.0.0. You have two options - either to update your project to use tslib ^2.0.0 or to use ng2-pdf-viewer 6.4.1.

2reactions
WilliamTepetcommented, Jun 18, 2021

I was struggling with the same issue regarding the versions:

"tslib": "^1.10.0" "@angular/cli": "^9.0.7"

so, I just downgrade to ng2-pdf-viewer 6.4.1 and now it works without problems!

@VadimDez Thanks for the headlight!

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeScript error TS1005: ';' expected (II) - Stack Overflow
Your installation is wrong; you are using a very old compiler version (1.0.3.0). tsc --version should return a version of 2.5.2.
Read more >
tsc with node.d.ts is giving error TS1005: ';' expected. #4004
grunt Running "typescript:base" (typescript) task >> typings/cookie-parser/cookie-parser.d.ts(11,15): error TS1005: ';' expected.
Read more >
node modules rxjs internal types d ts 81 44 error TS1005 ...
I got an error of:- node_modules/rxjs/internal/types.d.ts(81,44): error TS1005: ';'. Which I had expected after the installation of Angular ...
Read more >
Build SPFX@1.10.0 error - SharePoint Stack Exchange
Error information: [17:20:51] Error - [tsc] node_modules/antd/lib/_util/type.d.ts(8,83): error TS1005: '?' expected. [17:20:51] Error ...
Read more >
import gives ts1005... lots of them - Microsoft Community Hub
I have a problem that should be easy enough to pinpoint, ... /@uifabric/merge-styles/lib/DeepPartial.d.ts(4,26): error TS1005: ';' expected.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found