Code Monkey home page Code Monkey logo

Comments (6)

werthdavid avatar werthdavid commented on August 10, 2024 1

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.

odahcam avatar odahcam commented on August 10, 2024 1

Package updated and working: https://zxing-ngx-scanner.stackblitz.io/

from ngx-scanner.

Nightapes avatar Nightapes commented on August 10, 2024

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.

odahcam avatar odahcam commented on August 10, 2024

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.

odahcam avatar odahcam commented on August 10, 2024

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.

lock avatar lock commented on August 10, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.