meinaart / cypress-plugin-snapshots

Plugin for snapshot tests in Cypress.io
MIT License
491 stars 116 forks source link

(bug) Cannot find module 'js-base64/base64.min.js' #136

Closed kirill-konshin closed 3 years ago

kirill-konshin commented 4 years ago

Describe the bug

Install, run, observe the issue:

cy.task('cypress-plugin-snapshot:getFile') failed with the following error:
> Cannot find module 'js-base64/base64.min.js'

image

The reason is that file referenced in https://github.com/meinaart/cypress-plugin-snapshots/blob/31fd4a5b38409b98c47e76142d862b257ac7dd7f/src/paths.js#L2

Actually is not present in the package: image

It was there in version 2.5.x and in 2.6.x it is removed. The version installed with cypress-plugin-snapshots is currently 2.6.3.

I suggest to narrow the version range.

kirill-konshin commented 4 years ago

Just noticed #125 and #134. Please prioritize the merge as currently plugin is not usable unless you do something like this in package.json:

{
  "resolutions": {
    "js-base64": "2.5.2"
  }
}
WesleyKapow commented 4 years ago

NOTE: Ran into the same issue. Above work around resolved it.

skivol commented 4 years ago

Same here, had to use https://www.npmjs.com/package/npm-force-resolutions when using npm and not yarn.

actuallyReallyAlex commented 4 years ago

Yep. Looks like

NPM Solution

  1. Add
    {
    "resolutions": {
    "js-base64": "2.5.2"
    }
    }
  2. Add
    "scripts": {
    "preinstall": "npx npm-force-resolutions"
    }

Yarn Solution

  1. Add
    {
    "resolutions": {
    "js-base64": "2.5.2"
    }
    }
zakkor commented 4 years ago

Unfortunately it looks like the project is dead

ChanManChan commented 3 years ago

install this "@types/js-base64": "^2.0.0" <- this works for me Annotation 2020-08-08 203131

meinaart commented 3 years ago

Unfortunately it looks like the project is dead

Not really, just not working on it constantly. This should be fixed in the latest release.