secure-ls icon indicating copy to clipboard operation
secure-ls copied to clipboard

Incompatible lz-string 1.5.0

Open KrzysztofProgrammer opened this issue 1 year ago • 5 comments

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"

KrzysztofProgrammer avatar Mar 14 '23 19:03 KrzysztofProgrammer

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

elvispdosreis avatar Mar 22 '23 14:03 elvispdosreis

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 [email protected]

masasi avatar Mar 25 '23 11:03 masasi

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 [email protected]

Workaround:

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

KrzysztofProgrammer avatar Mar 25 '23 12:03 KrzysztofProgrammer

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 avatar Apr 14 '23 07:04 derekmcloughlin

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

derekmcloughlin avatar Apr 14 '23 12:04 derekmcloughlin

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

softvar avatar Jun 20 '24 07:06 softvar

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"
    }
}

bruno-lopes avatar Jun 20 '24 12:06 bruno-lopes