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

no *.ts files not found warning in xzing/library #3

Closed
juanele121976 opened this issue Dec 6, 2022 · 9 comments
Closed

no *.ts files not found warning in xzing/library #3

juanele121976 opened this issue Dec 6, 2022 · 9 comments

Comments

@juanele121976
Copy link

hello awesome hook
but i have problems, this is my package.json

{
"name": "pwa-app-lectorqr2",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.2",
"@types/node": "^17.0.45",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"react-zxing": "^1.0.5",
"typescript": "^4.9.3",
"web-vitals": "^2.1.4",
"workbox-background-sync": "^6.5.4",
"workbox-broadcast-update": "^6.5.4",
"workbox-cacheable-response": "^6.5.4",
"workbox-core": "^6.5.4",
"workbox-expiration": "^6.5.4",
"workbox-google-analytics": "^6.5.4",
"workbox-navigation-preload": "^6.5.4",
"workbox-precaching": "^6.5.4",
"workbox-range-requests": "^6.5.4",
"workbox-routing": "^6.5.4",
"workbox-strategies": "^6.5.4",
"workbox-streams": "^6.5.4",
"zxing-typescript": "^0.1.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
many warnings appear, that it does not find the files in xzing *.ts

Still open the app.
thank you very much for your help

image

@adamalfredsson
Copy link
Owner

It looks like you are using the wrong peer dependency. Instead of using zxing-typescript, you should use @zxing/library. This will ensure that you have the correct dependencies and that everything functions properly. Please update your dependencies and try again.

@TheTimeWalker
Copy link

Strangely enough, I also have the same warnings without installing any peer dependencies (neither zxing-typescript nor @zxing/library). I have only followed installing react-zxing like in the README

@adamalfredsson
Copy link
Owner

@TheTimeWalker I'm sorry, neither zxing-typescript nor @zxing/library are necessary peer dependencies like you say. I'm not really sure what could be causing this. Are you using windows? Have you got any clue? Thanks!

@TheTimeWalker
Copy link

Yes, that's how I understood as well. I meant that I have only followed the single installation step npm i react-zxing and am receiving these errors. e.g. I'm running the default react-scripts start command:

WARNING in ./node_modules/@zxing/library/esm/core/LuminanceSource.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/timewalker/react-project/node_modules/@zxing/src/core/LuminanceSource.ts' file: Error: ENOENT: no such file or directory, open '/home/timewalker/react-project/node_modules/@zxing/src/core/LuminanceSource.ts'

My hunch is that it's this issue in the zxing library: zxing-js/library#512

My tech specs:
OS: Arch Linux
TypeScript: 4.9.4
ReactJS: 18.2.0

@jacobclyne
Copy link

I am getting the same warnings.

@timraybould
Copy link

Looks like @zxing/library was updated to 19.2 to fix this problem. zxing-js/library#546

@adamalfredsson
Copy link
Owner

Looks like @zxing/library was updated to 19.2 to fix this problem. zxing-js/library#546

Thanks! I've updated this dependency in 1.1.1. Could anyone please confirm that this issue is resolved with 1.1.1?

@timraybould
Copy link

Looks like @zxing/library was updated to 19.2 to fix this problem. zxing-js/library#546

Thanks! I've updated this dependency in 1.1.1. Could anyone please confirm that this issue is resolved with 1.1.1?

I've tested it and this fixes it for me. Thank you!

@adamalfredsson
Copy link
Owner

Cool! I'll close this - please reopen if this issue persists!

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

5 participants