Comments (10)
Thanks! I missed the initial point about the "resolutions". I have tried it, and I see it works as expected when the dependencies are installed with yarn
, but I cannot find a workaround for npm
v.8 (I tried npm-force-resolutions
in preinstall
, but could not make it working).
from npm-pdfreader.
Thanks for the heads up!
Automated tests should have failed, if pdfreader does not work after that update… Any idea why they didn’t? 🤔
from npm-pdfreader.
This is really weird. If I git clone this repo and run npm i
, it will install pdf2json 1.2.5, but if I start with an empty directory and run npm i pdfreader
, it will install 1.3.1.
from npm-pdfreader.
I think I figured it out: it's package-lock.json. It sets pdf2json version to 1.2.5, but package-lock.json isn't shipped with the npm package. I'm not familiar with npm module best practices, but I don't think there should be any discrepancies between it and this repository.
from npm-pdfreader.
Good catch!
Unfortunately, I found out that npm
does not publish package-lock.json
, as stated on npm docs:
package-lock.json
cannot be published, and it will be ignored if found in any place other than the root project.
That said, if pdf2json
refuse to create a major version (which would be the right thing to do, considering that their recent change is a breaking one), this could be a workaround worth trying:
In contrast,
npm-shrinkwrap.json
allows publication, and defines the dependency tree from the point encountered.
Feel free to give it a try and propose a Pull Request if this solution solves your problem!
Adrien
from npm-pdfreader.
I just fixed the version of pdf2json
to 1.2.5
(instead of ^1.2.5
), as an attempt to prevent it from being upgraded when installing pdfreader
as a dependency of a Node.js project: bbf2e22
Does this fix your problem, by any chance?
from npm-pdfreader.
Hi Adrien!
I have bumped into a new problem with pdf2json
of nearest versions. I have a set of PDFs (hundreds of them) that were successfully imported earlier, I believe, around pdfreader's
version 1.2.8
. Now, I am trying to import them again, and for some files the process of import ends silently in 3-4 seconds with no errors and no callbacks invocation. I tried all the versions one by one - no luck.
I have just checked pdf2json
repo, and I see a new major version 2.0.0
released 3 days ago. It somehow parses these files again. :)
Is it possible to release some minor update of pdf2reader
with pdf2json
2.0.0
?
UPD: Version1.3.1
of pdf2json
also works for me.
UPD2: Okay, these are breaking changes, and patches will not work. :)
UPD3: I researched it a bit and found that import process is blocked by logo images on the pages. After removing images, the file was successfully imported both by 1.2.8
and 1.2.13
.
from npm-pdfreader.
FYI, @k2s proposed a fix that may make pdfreader compatible with pdf2json 2.0: https://github.com/adrienjoly/npm-pdfreader/releases/tag/v1.2.14
Check it out and please let us know if it works, when it's available on npm.
from npm-pdfreader.
I have installed 1.2.14
from npm, and I see pdf2json
1.2.5
in package-lock.json. So, it still silently does nothing with my test file. Is there a way to specify the version of pdf2json
on my side?
UPD: fork from 1.2.14
where pdf2json
version is changed to 2.0.0
works for me.
from npm-pdfreader.
Have you tried specifying a different version of pdf2json in the "resolutions" section of package.json yet, as proposed there: #97 ?
from npm-pdfreader.
Related Issues (20)
- ReferenceError: MozBlobBuilder is not defined HOT 1
- example not working as shown in the document HOT 4
- PDF parse failed HOT 11
- Question: Missing spaces in text output HOT 1
- Can't import library: Unexpected token '(' HOT 7
- 'ava' is not recognized as an internal or external command - When testing compatibility HOT 5
- Clarification on latest release of pdfreader HOT 2
- Gettin items as promise HOT 1
- Make it async // return item as promise HOT 3
- Importing module failed HOT 4
- [ERR_REQUIRE_ESM] require() of ES Module is not supported HOT 13
- It is not supporting the TS type declaration. HOT 25
- aws lambda, sst. Error: Identifier '__dirname' has already been declared HOT 2
- Rules not working HOT 1
- Import when using the library in Cypress HOT 1
- Can I get the coordinates of the given text from all pages of the PDF? HOT 1
- Setting up fake worker. HOT 3
- Cannot read text based PDF file content HOT 4
- Where is `displayValue` declared? HOT 1
- isDebugMode - No such file or directory "test\data\05-versions-space.pdf" HOT 2
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 npm-pdfreader.