Git Product home page Git Product logo

Comments (8)

martinkasa avatar martinkasa commented on July 25, 2024 2

Hi all,
for use with Capacitor v2 please use fixed version to 0.5.1

"capacitor-secure-storage-plugin": "0.5.1"

for Capacitor 3.0 use latest or 0.6.0

"capacitor-secure-storage-plugin": "^0.6.0"

I have tested both versions, but if you find some bug, feel free to open new issue.

from capacitor-secure-storage-plugin.

mraible avatar mraible commented on July 25, 2024 1

I started getting the following error in an Ionic app today that uses this plugin.

[ng] Error: node_modules/capacitor-secure-storage-plugin/node_modules/@capacitor/core/types/definitions-internal.d.ts:16:18 - error TS2430: Interface 'CapacitorInstance' incorrectly extends interface 'CapacitorGlobal'.
[ng]   Types of property 'Plugins' are incompatible.
[ng]     Property 'SecureStoragePlugin' is missing in type '{ [pluginName: string]: { [prop: string]: any; }; }' but required in type 'PluginRegistry'.
[ng] 16 export interface CapacitorInstance extends CapacitorGlobal {
[ng]                     ~~~~~~~~~~~~~~~~~
[ng]   node_modules/capacitor-secure-storage-plugin/dist/esm/definitions.d.ts:3:9
[ng]     3         SecureStoragePlugin: SecureStoragePluginPlugin;
[ng]               ~~~~~~~~~~~~~~~~~~~
[ng]     'SecureStoragePlugin' is declared here.

I believe this comes from Ionic AppAuth, but I'm not sure. wi3land/ionic-appauth#60

Any ideas for a workaround?

from capacitor-secure-storage-plugin.

martinkasa avatar martinkasa commented on July 25, 2024 1

Hi all, I will look at it during weekend.

from capacitor-secure-storage-plugin.

mraible avatar mraible commented on July 25, 2024 1

Thanks for the tip @VictorCoding! I was able to solve this issue temporarily by creating an npm-shrinkwrap.json file with the following contents.

{
  "dependencies": {
    "capacitor-secure-storage-plugin": {
      "version": "0.4.0",
      "dependencies": {
        "@capacitor/core": {
          "version": "2.4.7"
        }
      }
    }
  }
}

from capacitor-secure-storage-plugin.

VictorCoding avatar VictorCoding commented on July 25, 2024

I'm experiencing the same issue as @mraible, except i'm not using the ionic-appauth plugin.

from capacitor-secure-storage-plugin.

casper5822 avatar casper5822 commented on July 25, 2024

Same problem for me, the plugin is incompatible with new packaging of capacitor 3.0. There are not workarounds, the solution i think is only a new plugin version

from capacitor-secure-storage-plugin.

VictorCoding avatar VictorCoding commented on July 25, 2024

@mraible @casper5822 So after some more digging it seems that the issue is that the capacitor-secure-storage-plugin is installing @capacitor/core version 3.0.0 since it has @capacitor/core: latest listed as its dependency in its package.json. And well, capacitor-secure-storae-plugin is not compatible with capacitor 3.0.0. Therefore my solution was to force it to install and use @capacitor/core: 2.4.7 instead. I followed this SO post. https://stackoverflow.com/questions/15806152/how-do-i-override-nested-npm-dependency-versions

from capacitor-secure-storage-plugin.

casper5822 avatar casper5822 commented on July 25, 2024

@martinkasa thank you, hope you can fix it

from capacitor-secure-storage-plugin.

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.