Skip to content
New issue

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

Unexpected token compiler error #147

Closed
xb-developer opened this issue Jun 25, 2021 · 3 comments
Closed

Unexpected token compiler error #147

xb-developer opened this issue Jun 25, 2021 · 3 comments

Comments

@xb-developer
Copy link

Good morning, I'm running into a compiler issue: `./node_modules/react-pdf-highlighter/node_modules/pdfjs-dist/lib/display/api.js 1926:137
Module parse failed: Unexpected token (1926:137)
File was processed with these loaders:

  • ./node_modules/babel-loader/lib/index.js
    You may need an additional loader to handle the result of these loaders.
    | numPages: this._numPages,
    | annotationStorage: (annotationStorage === null || annotationStorage === void 0 ? void 0 : annotationStorage.serializable) || null,
  filename: ((_this$_fullReader = this._fullReader) === null || _this$_fullReader === void 0 ? void 0 : _this$_fullReader.filename) ?? null

| }).finally(() => {
| if (annotationStorage) {`

when I try to import only the example folder in my project and then running "npm install react-pdf-highlighter". Any hints on what could the problem be? Thanks

@Vagizova
Copy link

Hi! did you solve this?

@jinman
Copy link
Contributor

jinman commented Aug 26, 2021

By moving into a lower version of pdfjs-dist "2.6.347". But that is not the right solution. @agentcooper, can you guide?

@agentcooper
Copy link
Owner

Should be fixed by version 5.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants