Comments (12)
It's strange because I have not this problem with 1.0.2 release. What is the right way to produce dist directory ?
from ng2-pdf-viewer.
Are you just cloning master branch, did i understand right ?
from ng2-pdf-viewer.
Yes just master branch, you understand right
from ng2-pdf-viewer.
i made mistake and started to developed 2.0.0 in master... so it's not yet ready there
from ng2-pdf-viewer.
Ok, but the thing is I have also this error with my previous stable fork (#pdfviewer-way-pr).
I don't understand where it comes from, as I don't know fine how works configurations in angular-cli.
Have you also this error with master ?
What the difference between master and 1.0.2 about library linking ? (because 1.0.2 don't gives this error)
from ng2-pdf-viewer.
I am facing same issue.
This is entry in my package.json folder
"ng2-pdf-viewer": "1.0.2",
How to solve this?
from ng2-pdf-viewer.
I get also this error during testing library with the demo app, npm run all
gives a better trace :
Error: (SystemJS) pdfjsLib is undefined
@http://localhost:8000/lib/pdfjs-dist/web/pdf_viewer.js:125:5
__w_pdfjs_require__@http://localhost:8000/lib/pdfjs-dist/web/pdf_viewer.js:45:12
@http://localhost:8000/lib/pdfjs-dist/web/pdf_viewer.js:2659:15
__w_pdfjs_require__@http://localhost:8000/lib/pdfjs-dist/web/pdf_viewer.js:45:12
@http://localhost:8000/lib/pdfjs-dist/web/pdf_viewer.js:3367:25
__w_pdfjs_require__@http://localhost:8000/lib/pdfjs-dist/web/pdf_viewer.js:45:12
@http://localhost:8000/lib/pdfjs-dist/web/pdf_viewer.js:91:18
@http://localhost:8000/lib/pdfjs-dist/web/pdf_viewer.js:26:18
@http://localhost:8000/pdf-viewer/pdf-viewer.component.js:18:1
@http://localhost:8000/pdf-viewer/pdf-viewer.component.js:1:31
@http://localhost:8000/pdf-viewer/pdf-viewer.component.js:1:2
@http://localhost:8000/app/app.component.js:12:30
@http://localhost:8000/app/app.component.js:1:31
@http://localhost:8000/app/app.component.js:1:2
@http://localhost:8000/app.module.js:14:23
@http://localhost:8000/app.module.js:1:31
@http://localhost:8000/app.module.js:1:2
@http://localhost:8000/main.js:3:20
@http://localhost:8000/main.js:1:31
@http://localhost:8000/main.js:1:2
ZoneDelegate.prototype.invoke@http://localhost:8000/lib/zone.js/dist/zone.js:232:17
Zone.prototype.run@http://localhost:8000/lib/zone.js/dist/zone.js:114:24
scheduleResolveOrReject/<@http://localhost:8000/lib/zone.js/dist/zone.js:502:52
ZoneDelegate.prototype.invokeTask@http://localhost:8000/lib/zone.js/dist/zone.js:265:21
Zone.prototype.runTask@http://localhost:8000/lib/zone.js/dist/zone.js:154:28
drainMicroTaskQueue@http://localhost:8000/lib/zone.js/dist/zone.js:401:25
ZoneTask/this.invoke@http://localhost:8000/lib/zone.js/dist/zone.js:339:25
Evaluating http://localhost:8000/pdf-viewer/pdf-viewer.component.js
Evaluating http://localhost:8000/app/app.component.js
Evaluating http://localhost:8000/app.module.js
Evaluating http://localhost:8000/main.js
Error loading http://localhost:8000/main.js
from ng2-pdf-viewer.
There is an other trace after gulp build
[12:01:46] 'compile' errored after 5.24 s
[12:01:46] Error: Command failed: ./node_modules/.bin/ngc -p tsconfig-aot.json
Error at /it/_ng2-pdf-viewer/node_modules/@types/jasmine/index.d.ts:39:38: A parameter initializer is only allowed in a function or constructor implementation.
Error at /it/_ng2-pdf-viewer/node_modules/@types/jasmine/index.d.ts:39:46: Cannot find name 'keyof'.
Error at /it/_ng2-pdf-viewer/node_modules/@types/jasmine/index.d.ts:39:52: '=' expected.
at ChildProcess.exithandler (child_process.js:211:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:885:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
npm ERR! Linux 4.4.0-62-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v7.4.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `gulp build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script 'gulp build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ng2-pdf-viewer package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ng2-pdf-viewer
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ng2-pdf-viewer
npm ERR! There is likely additional logging output above.
from ng2-pdf-viewer.
@VadimDez
I almost sure that this bug appears only with lastest node/npm.
As @shabbir-dhangot I cannot even build 1.0.2 from branch features/1.0.2.
Which version of node/npm do you used to build 1.0.2 release ?
from ng2-pdf-viewer.
@Vi-dot I'm using node v6.9.5 and npm 4.2.0
from ng2-pdf-viewer.
@VadimDez still not works :/ Strange
I clear and tried to build features/1.0.2 with those versions :
node v6.9.5
npm v3.10.10
from ng2-pdf-viewer.
I fixed it by adding at begging this include :
"../node_modules/pdfjs-dist/build/pdf.js"
Then if you have an angular-cli project, add this path in angular-cli.json in "scripts" field.
I don't know if it exists a best solution to include it in ng2-pdf-viewer instead of project.
from ng2-pdf-viewer.
Related Issues (20)
- pef(Listeners): not removed
- Appending Date and Time with author name in annotation yellow text popup
- Any plans to upgrade to latest pdf.js version HOT 1
- Large file not shows starting pages quickly, is there any way to control chunk requests' sequence for linearization?
- How to get total page count of PDF? HOT 1
- CSP unsafe-inline directive blocks pdf viewer
- Not rendering PDF in angular 17, ng2-pdf-viewer : v10.0.0 HOT 1
- Perticular renge load like pages 5-12 only
- Can't show pdf error ERR_CERT_DATE_INVALID HOT 3
- Thumbnail View I have shown up but scroll issue happned
- Range requests / partial responses do not work in chrome
- Anchor-link in PDF file.
- PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF HOT 9
- ng-pdf-viewer showing black screen HOT 2
- How I can acess RenderParameters from pdf.js
- Update pdfjs-dist to 4.2.67 or later HOT 9
- TS2304: Cannot find name 'WeakKey'. HOT 7
- scrollPageIntoView: "1" is not a valid pageNumber parameter.
- Whats the recommended version to use with angular 15 ?
- (page-rendered)="pdfPageRendered2($event)" event is not working as expected with angular 16.2.12 & ng2-pdf-viewer v^9.1.5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ng2-pdf-viewer.