#Adding storage module using ionic angular

32 messages · Page 1 of 1 (latest)

timber dock
#

Hello people, So i'm a bit of a beginner here, and trying to make an angular ionic app. At the moment i'm trying to save user data in the storage. But i'm having trouble importing drivers from @ionic/storage. Currently i'm following this tutorial: https://youtu.be/vCfAe2esboU?t=636 . This is also the moment he add's the import. I've tried different ways but all of them end up using this import. Does anyone have a solution? is there something else i need to install, or change in my code?
Also using this but same results: https://github.com/ionic-team/ionic-storage

The latest Ionic Storage v3 release came with some breaking changes that we will implement in a simple Ionic app, plus we'll handle a potential race condition when creating Ionic Storage instances!

🔥 Learn Ionic faster with the Ionic Academy: https://ionicacademy.com/

🎉 Get my Practical Ionic Book: https://devdactic.com/practical-ionic/

#####...

▶ Play video
GitHub

Ionic Storage module for Ionic apps. Contribute to ionic-team/ionic-storage development by creating an account on GitHub.

weak bobcat
#

Make sure your versions are all compatible. Post the complete output of ng version here as text.

timber dock
#

/ \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|

/ △ \ | '_ \ / | | | | |/ _ | '__| | | | | | |
/ ___ | | | | (
| | || | | (| | | | || | | |
// __| ||_, |_,||_,|| _|||
|___/

Angular CLI: 14.2.3
Node: 16.17.0
Package Manager: npm 8.15.0
OS: win32 x64

Angular: 14.2.2
... common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package Version

@angular-devkit/architect 0.1402.3
@angular-devkit/build-angular 14.2.3
@angular-devkit/core 14.2.3
@angular-devkit/schematics 14.2.3
@angular/cli 14.2.3
@schematics/angular 14.2.3
rxjs 6.6.7
typescript 4.7.4

#

from the cmd ng version

weak bobcat
#

g!codeblock @timber dock Please you a code block.

teal lilyBOT
#

@timber dock, you can use the following snippet to have your code formatted and colored by Discord. Replace ts with the language you need (i.e. html, js, css, etc)
```ts
// your code goes here
```

weak bobcat
#

what about ionic info?

timber dock
#

wdym with ionic info? im pretty new with this. If you are talking about asking the ionic team or any of them, i tried but not getting a response. I've also tried their website but it uses this method. i'm getting the same problems

#

Also tried re-installing the package but that doesnt work either

#
// "version": "0.0.1",
      "dependencies": {
        "@angular/common": "^14.0.0",
        "@angular/core": "^14.0.0",
        "@angular/forms": "^14.0.0",
        "@angular/platform-browser": "^14.0.0",
        "@angular/platform-browser-dynamic": "^14.0.0",
        "@angular/router": "^14.0.0",
        "@capacitor-community/http": "^1.4.1",
        "@capacitor-community/sqlite": "4.2.2-1",
        "@capacitor/app": "4.0.1",
        "@capacitor/core": "4.2.0",
        "@capacitor/haptics": "4.0.1",
        "@capacitor/keyboard": "4.0.1",
        "@capacitor/status-bar": "4.0.1",
        "@ionic/angular": "^6.1.9",
        "@ionic/storage": "^2.0.0",
        "@ionic/storage-angular": "^3.0.6",
        "ionicons": "^6.0.3",
        "localforage-cordovasqlitedriver": "^1.8.0",
        "rxjs": "~6.6.0",
        "tslib": "^2.2.0",
        "zone.js": "~0.11.4"
#

these are the versions better displayed btw

#

ionic storage is 2.0.0

#

the one i use

#

that's because someone said that it should be on 2.0.0

#

ive updated it to 2.3.1 now but still the same problem.

weak bobcat
#

Did you not install the Ionic CLI?

timber dock
#

ionic and angular cli are already installed

#

here lemme show the whole document

#

didnt know you needed the rest too

#
// {
      "devDependencies": {
        "@angular-devkit/build-angular": "^14.0.0",
        "@angular-eslint/builder": "~13.0.1",
        "@angular-eslint/eslint-plugin": "~13.0.1",
        "@angular-eslint/eslint-plugin-template": "~13.0.1",
        "@angular-eslint/template-parser": "~13.0.1",
        "@angular/cli": "^14.0.0",
        "@angular/compiler": "^14.0.0",
        "@angular/compiler-cli": "^14.0.0",
        "@angular/language-service": "^14.0.0",
        "@capacitor/cli": "4.2.0",
        "@ionic/angular-toolkit": "^6.0.0",
        "@ionic/cli": "6.20.1",
        "@types/jasmine": "~3.6.0",
        "@types/jasminewd2": "~2.0.3",
        "@types/node": "^12.11.1",
        "@typescript-eslint/eslint-plugin": "5.3.0",
        "@typescript-eslint/parser": "5.3.0",
        "eslint": "^7.6.0",
        "eslint-plugin-import": "2.22.1",
        "eslint-plugin-jsdoc": "30.7.6",
        "eslint-plugin-prefer-arrow": "1.2.2",
        "jasmine-core": "~3.8.0",
        "jasmine-spec-reporter": "~5.0.0",
        "karma": "~6.3.2",
        "karma-chrome-launcher": "~3.1.0",
        "karma-coverage": "~2.0.3",
        "karma-coverage-istanbul-reporter": "~3.0.2",
        "karma-jasmine": "~4.0.0",
        "karma-jasmine-html-reporter": "^1.5.0",
        "ts-node": "~8.3.0",
        "typescript": "~4.7.3"
      }
    },
#

ionic and angular cli are installed

#

correctly

#

i did start from the official docs

weak bobcat
#

Then what is the output of ionic info?

#

Your package.json is just the minimum of what could be installed. My questions are to determine what is actually installed

#

And your @angular-eslint/builder etc are v13, when you are using v14 of Angular.

timber dock
#
 **Ionic:

   Ionic CLI                     : 6.20.3 (C:\Users\CAT\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework               : @ionic/angular 6.2.7
   @angular-devkit/build-angular : 14.2.3
   @angular-devkit/schematics    : 14.2.3
   @angular/cli                  : 14.2.3
   @ionic/angular-toolkit        : 6.1.0

Capacitor:

   Capacitor CLI      : 4.2.0
   @capacitor/android : 4.2.0 (C:\Users\CAT\node_modules\@capacitor\android)
   @capacitor/core    : 4.2.0
   @capacitor/ios     : 4.2.0 (C:\Users\CAT\node_modules\@capacitor\ios)

Utility:

   cordova-res : 0.15.4
   native-run  : 1.7.0

System:

   NodeJS : v16.17.0 (C:\Program Files\nodejs\node.exe)
   npm    : 8.15.0
   OS     : Windows 10**
timber dock
#

@weak bobcat do you still have any idea? I cant seem to find anyone to help me solve this problem. I've tried everything. my versions all line up so i'm confused..

weak bobcat
#

From the channel description from #751791779577069639

Ionic is an Open Source SDK for hybrid mobile apps written in Angular, React or Vue.

Note: while you are welcome to ask questions here, there is an official Ionic forum which is the best place to ask Ionic questions! https://forum.ionicframework.com/

Ionic Forum

Forum for Ionic Framework, Capacitor, and everything cross-platform mobile app development related

#

I do not use Ionic myself. Mobile apps should largely just be web apps IMPO.