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.

npm install pdf.js does not install PDF.js

See original GitHub issue

As every other library an easy way to use it should be available without me to need to build it. I want to test it so, a script tag should be enough to get started.

In my case I use webpack and require(‘pdf.js’) doesn’t work because of your coffee files. NPM should work out of the box. I’ve installed with npm install pdf.js.

I also get an error if I follow your instructions:

module.js:340
    throw err;
          ^
Error: Cannot find module 'C:\a\node_modules\pdf.js\make'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3

I think I need make library. I suppose this is the command? npm install make -g

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
totty90commented, Mar 3, 2015

Shouldn’t be added on your readme? Instead of all that complicated way which requires to build it manually? Just drop: npm install pdfjs-dist and is pretty done. You can also add bower.

0reactions
yurydelendikcommented, Mar 3, 2015

Looks like this issue is not connected with Mozilla’s PDF.js. Closing as invalid.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pdfjs-dist
Start using pdfjs-dist in your project by running `npm i pdfjs-dist`. There are 1210 other projects in the npm registry using pdfjs-dist.
Read more >
Npm install dependencies error (pdf.js plugin)
Did you eventually get this to work? I'm running node 9.1.1 on M2 Mac, I've got exact same error as in your first...
Read more >
Integrating PDF.js Express Viewer with NPM | Documentation
Please get your free Viewer key here if you do not have one. 1) Install with NPM. Run the following command in your...
Read more >
pdfjs | Yarn - Package Manager
NPM Dependency Status Build Status · Documentation | Playground npm install pdfjs ... All notable changes to this project will be documented in...
Read more >
Getting Started
With the prebuilt or source version, open web/viewer.html in a browser and the test pdf should load. Note: the worker is not enabled...
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