Comments (6)
This is probably a problem with your environment, please try to install:
npm install --global --production windows-build-tools
...and try again.
from ngx-scanner.
Package updated and working: https://zxing-ngx-scanner.stackblitz.io/
from ngx-scanner.
I have the same issue and the solution from @werthdavid did not work.
I found out that the issue is in @zxing-web/library
with sharp 0.19.1
. With sharp 0.20.0 the issue does not appear. I created a PR zxing-js/library#10
from ngx-scanner.
I see your problem, but this is in fact a environment problem. The sharp
package is not friendly for Windows environments (or for any environment, maybe).
I had this problem too in the past and it is a pain in the ass and very hard to track down the real problem to solve.
I merged the @Nightapes PR at @zxing-web/library
repo and I will publish the package ASAP. But keep in mind that the error may not disappear, as it is an environment issue that has nothing to do with @angular/cli
.
from ngx-scanner.
Just to share with you guys, this is what happens when npm install
in zxing library:
~/Projects/zxing-web/library (master)
$ npm install
npm WARN deprecated [email protected]: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated [email protected]: Use uuid module instead
> [email protected] install C:\Users\67390\Projects\zxing-web\library\node_modules\uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0
> [email protected] install C:\Users\67390\Projects\zxing-web\library\node_modules\phantomjs-prebuilt
> node install.js
PhantomJS not found on PATH
Download already available at C:\Users\67390\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zip
Verified checksum of previously downloaded file
Extracting zip contents
Removing C:\Users\67390\Projects\zxing-web\library\node_modules\phantomjs-prebuilt\lib\phantom
Copying extracted folder C:\Users\67390\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zip-extract-1521118385189\phantomjs-2.1.1-windows -> C:\Users\67390\Projects\zxing-web\library\node_modules\phantomjs-prebuilt\lib\phantom
Writing location.js file
Done. Phantomjs binary available at C:\Users\67390\Projects\zxing-web\library\node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.exe
> [email protected] install C:\Users\67390\Projects\zxing-web\library\node_modules\sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.6.1/libvips-8.6.1-win32-x64.tar.gz
info sharp Creating C:\Users\67390\Projects\zxing-web\library\node_modules\sharp\build\Release
info sharp Copying DLLs from C:\Users\67390\Projects\zxing-web\library\node_modules\sharp\vendor\lib to C:\Users\67390\Projects\zxing-web\library\node_modules\sharp\build\Release
prebuild-install info begin Prebuild-install version 2.5.1
prebuild-install info looking for local prebuild @ prebuilds\sharp-v0.20.0-node-v57-win32-x64.tar.gz
prebuild-install info looking for cached prebuild @ C:\Users\67390\AppData\Roaming\npm-cache\_prebuilds\https-github.com-lovell-sharp-releases-download-v0.20.0-sharp-v0.20.0-node-v57-win32-x64.tar.gz
prebuild-install http request GET https://github.com/lovell/sharp/releases/download/v0.20.0/sharp-v0.20.0-node-v57-win32-x64.tar.gz
prebuild-install http 200 https://github.com/lovell/sharp/releases/download/v0.20.0/sharp-v0.20.0-node-v57-win32-x64.tar.gz
prebuild-install info downloading to @ C:\Users\67390\AppData\Roaming\npm-cache\_prebuilds\https-github.com-lovell-sharp-releases-download-v0.20.0-sharp-v0.20.0-node-v57-win32-x64.tar.gz.29084-ea6877ce66f2a.tmp
prebuild-install info renaming to @ C:\Users\67390\AppData\Roaming\npm-cache\_prebuilds\https-github.com-lovell-sharp-releases-download-v0.20.0-sharp-v0.20.0-node-v57-win32-x64.tar.gz
prebuild-install info unpacking @ C:\Users\67390\AppData\Roaming\npm-cache\_prebuilds\https-github.com-lovell-sharp-releases-download-v0.20.0-sharp-v0.20.0-node-v57-win32-x64.tar.gz
prebuild-install info unpack resolved to C:\Users\67390\Projects\zxing-web\library\node_modules\sharp\build\Release\sharp.node
prebuild-install info unpack required C:\Users\67390\Projects\zxing-web\library\node_modules\sharp\build\Release\sharp.node successfully
prebuild-install info install Successfully installed prebuilt binary!
> [email protected] postinstall C:\Users\67390\Projects\zxing-web\library\node_modules\webpack\node_modules\uglifyjs-webpack-plugin
> node lib/post_install.js
> [email protected] postinstall C:\Users\67390\Projects\zxing-web\library\node_modules\sinon
> node -e "console.log('\u001b[32mLove sinon? You can now support the project via the open collective:\u001b[22m\u001b[39m\n > \u001b[96m\u001b[1mhttps://opencollective.com/sinon/donate\u001b[0m\n')" || exit 0
Love sinon? You can now support the project via the open collective:
> https://opencollective.com/sinon/donate
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] requires a peer of mocha@^2.4.5 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of webpack@^1.12.13 || ^2.1.0-beta.15 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
added 1076 packages from 1758 contributors in 107.087s
As you can see, that's a lot of things, especially for Windows environments.
from ngx-scanner.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from ngx-scanner.
Related Issues (20)
- Property '"autofocusEnabled"' is incompatible with index signature. HOT 2
- Cannot Scan code 93 and Codabar barcodes. No errors in the console as well
- cannot scan UPC_E barcodes
- Cannot read properties of undefined (reading stop)
- [Firefox-android] Permission issue HOT 1
- Please support Angular 17 HOT 1
- Cordova Android app
- Area of intreset feature
- Windows 11, camera shows screen stream instead
- Error reading QR code in Chrome
- when you open a scanner multiple times the CPU usage gets to 100% HOT 3
- Dependency bug
- Add Support for willReadFrequently to Optimize Canvas Readback Performance HOT 2
- ZxingScannerComponent is not releasing all resources - BrowserCodeReader still trying to decode after ngDestroy HOT 3
- ZxingScannerComponen.init method called twice when enable flag is set to true (leak once again) HOT 8
- iPadOS black screen after installation to homescreen, works on safari HOT 4
- Support v0.21.0 zxing library HOT 1
- Upgrade to Angular 18.x HOT 1
- Error al intentar implementar esta libreria en angular 17 HOT 1
- DOMException: setPhotoOptions failed when stoping scanner after upgrade from v17.0.1 to 17.0.2 or above HOT 4
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 ngx-scanner.