Skip to content

Vue 2 error regarding get-pixels/request/asn1, was: broken dependency from recent updates? #536

@lampsbr

Description

@lampsbr

Hi!
I run current quagga2 in a vue.js 2 project that gives me the following error message after a recent npm install:

WARNING in ./node_modules/asn1.js/lib/asn1/api.js 21:12-42
Module not found: Error: Can't resolve 'vm' in '/var/www/html/node_modules/asn1.js/lib/asn1'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "vm": require.resolve("vm-browserify") }'
        - install 'vm-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "vm": false }

webpack compiled with 1 warning
^C
4250f6a17e25:/var/www/html# npm ls asn1
project /var/www/html
`-- @ericblade/[email protected]
  `-- [email protected]
    `-- [email protected]
      `-- [email protected]
        `-- [email protected]
          `-- [email protected]

I just checked that get-pixels does not have an update currently, so I don't know for sure how can this be fixed.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions