softvar / secure-ls

:lock: Secure localStorage data with high level of encryption and data compression
http://softvar.github.io/secure-ls
MIT License
646 stars 82 forks source link

Incompatible lz-string 1.5.0 #69

Closed KrzysztofProgrammer closed 4 months ago

KrzysztofProgrammer commented 1 year ago

At package.json there is

    "lz-string": "^1.4.4"

It will take version 1.5.0. Unfotnatelly this version is not compatible.

After all we have error:

Error: node_modules/secure-ls/dist/secure-ls.d.ts:24:24 - error TS2694: Namespace '".....node_modules/secure-ls/node_modules/lz-string/typings/lz-string"' has no exported member 'LZStringStatic'.

24     LZString: LZString.LZStringStatic;

If I force in my project "lz-string": "1.4.4" , version 1.5.0 will appear inside node_modules/secure-ls/node_modules. There is no nice workaround with this, but only to delete this internal node_modules.

Please change dependencies to

    "lz-string": "1.4.4"
elvispdosreis commented 1 year ago

fixed "lz-string": "1.4.4" incompatible lz-string 1.4.5

masasi commented 1 year ago

At package.json there is

    "lz-string": "^1.4.4"

It will take version 1.5.0. Unfotnatelly this version is not compatible.

After all we have error:

Error: node_modules/secure-ls/dist/secure-ls.d.ts:24:24 - error TS2694: Namespace '".....node_modules/secure-ls/node_modules/lz-string/typings/lz-string"' has no exported member 'LZStringStatic'.

24     LZString: LZString.LZStringStatic;

If I force in my project "lz-string": "1.4.4" , version 1.5.0 will appear inside node_modules/secure-ls/node_modules. There is no nice workaround with this, but only to delete this internal node_modules.

Please change dependencies to

    "lz-string": "1.4.4"

I am experiencing the same problem!? Do I need to force it to npm i lz-string@1.4.4

KrzysztofProgrammer commented 1 year ago

If I force in my project "lz-string": "1.4.4" , version 1.5.0 will appear inside node_modules/secure-ls/node_modules. There is no nice workaround with this, but only to delete this internal node_modules. Please change dependencies to

    "lz-string": "1.4.4"

I am experiencing the same problem!? Do I need to force it to npm i lz-string@1.4.4

Workaround:

  1. place in project dependencies at package.json
    "lz-string": "1.4.4",
  2. install packages
    npm i
  3. remove from node_modules/secure-ls place where node install 1.5.0 version
    rm -fr node_modules/secure-ls/node_modules
derekmcloughlin commented 1 year ago

Hi, I'm experiencing the same problem. What is LZStringStatic? I don't see any reference to it in the lz-string project.

I've put in "lz-string": "1.4.4" into the overrides section of my package.json, and I had to provide a type definition file for TypeScript to declare the module, but I'm still getting the error:

Namespace '"lz-string"' has no exported member 'LZStringStatic'.

Is it possible to alias LZStringStatic so something that it knows about?

derekmcloughlin commented 1 year ago

I got around the problem by installing @types/lz-string (1.3.34) and copying the @types/lz-string/index.d.ts contents to my src/@types/lz-string.d.ts

softvar commented 4 months ago

Hey @KrzysztofProgrammer , @elvispdosreis , @masasi , @derekmcloughlin ,

All the dependencies have been upgraded to use the latest ones. Even all the dev-dependencies are now upgraded. Please use version 2.0.0 - https://www.npmjs.com/package/secure-ls/v/2.0.0

bruno-lopes commented 4 months ago

I upgraded to 2.0.0, but I still get the same error. I had to use:

"overrides": {
    "secure-ls": {
      "lz-string": "1.4.4"
    }
}