The Index Module in Ionic 2 is missing the export for the SqlStorage member

Currently, I am utilizing Ionic 2 and attempting to work with SqlStorage to generate queries. However, it seems that the import is not functioning properly.

Here is what I have:

import {Storage, SqlStorage} from '@ionic/storage';

Unfortunately, this results in the following error:

Typescript Error Module '"/home/../node_modules/@ionic/storage/es2015/index"' has no exported member 'SqlStorage'.

As for my Ionic version:

Cordova CLI: 6.4.0 Ionic Framework Version: 2.3.0 Ionic CLI Version: 2.2.1 Ionic App Lib Version: 2.2.0 Ionic App Scripts Version: 1.1.4 ios-deploy version: Not installed ios-sim version: Not installed OS: Linux 4.4 Node Version: v7.4.0 Xcode version: Not installed

If anyone could provide assistance, it would be greatly appreciated.

Answer №1

One potential solution could be to delete the node_modules directory and then proceed with running npm install

By doing this, it will recreate your node_modules directory and ideally resolve the issue.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Disable the selection of the year option in the Angular Material Date picker

I need help with disabling the year selection in the Angular Material date picker component. To achieve this, I have implemented a custom native date adapter which only allows the selection of the day and month, keeping the year fixed. Here is a snippet ...

Encountering a ReactJs and TypeScript error: "menuItems.map is not a function, issue with map method"

Greetings! I am currently working on implementing the logic of using useState and mapping an array to show only one dropdown item at a time. Below is my array structure with tags (menu name, links (to router), icon (menu icon), and if there are dropdown i ...

What is the best way to implement a decorator for a class method variable within a NestJS framework?

import {isNotEmpty} from "class-validator"; export Service { create(createdto) { const {name,age} = createdto; @isNotEmpty() name //applying a decorator to ensure name is not null or undefined } } As the decorator is designed for ...

Discover the steps to extend static generic methods in Typescript

My issue lies in compiling Typescript code as the compiler doesn't seem to recognize the inheritance between my classes. Whenever I attempt to compile, an error arises: Property 'create' does not exist on type 'new () => T'. ...

Styling with react-jss based on intricate conditionals

After experimenting with react-jss for a few weeks, I am faced with the challenge of styling components efficiently. With numerous conditionals in these components, I am striving to avoid creating an excess of new components that essentially share the same ...

Error in Angular8: Attempting to loop through an undefined property

I have searched tirelessly for a solution, but none of them seem to work. Every time I click on the edit button, it redirects me to edit-event page and shows me this error: ERROR TypeError: Cannot read property 'categories' of undefined n ...

Building a custom angular component library using the latest Angular CLI version 12

I attempted to create an angular workspace using Angular CLI with a library included. The goal was for another app to be able to import the angular npm package and display the exported default component. Here are the commands I used for generation: ng ne ...

Creating an external stylesheet and including it in a component: A beginner's guide

Hello, I am looking to create an external CSS file and link it to a component. I have provided the code below, but I am encountering errors which are mentioned further down. Please review the code and let me know where I may have made a mistake and provide ...

Identifying an SCSS file based on its class name in Angular

Currently, I'm utilizing an Angular 5 application with styles that are encapsulated within components. Upon running the ng serve command, all styles get inserted into <styles> tags within the <head> section of the page. This results in br ...

Implement a default dropdown menu that displays the current month using Angular and TypeScript

I am looking to implement a dropdown that initially displays the current month. Here is the code snippet I have used: <p-dropdown [options]="months" [filter]="false" filterBy="nombre" [showClear] ...

Mistakes that occur while trying to expand a base class to implement CRUD functionality

Creating a base class in TypeScript for a node.js application to be extended by all entities/objects for CRUD operations is my current challenge. The base class implementation looks like this: export class Base { Model: any; constructor(modelName ...

What are some strategies for effectively handling numerous GraphQL modules within Apollo-Angular?

Currently at our workplace, we are in the process of developing a large project that relies on libraries created by various teams. However, we have encountered an issue with Apollo-Angular when it comes to importing multiple modules with their own graphql ...

Require a property to be mandatory depending on the value of another property within a generic interface

Looking for a way to have one property affect the others in a react component interface? Here's an example of what I'm trying to achieve: export interface IMyAwesomeComponentProps<T = {}> { className: string defaultPath?: ISomeOthe ...

Ways to transfer data between components in Angular 2: Passing variables between children

Within my application, I have a parent component (P) and two children components (C1) and (C2). Both C1 and C2 are children of the parent component P, but they are not nested. In the parent template, it is structured as follows: <c1-component></c ...

Filtering through select options made easy with Bootstrap 4 in Angular

I am currently working on an Angular project and have integrated Bootstrap 4 into it. Within the project, I am utilizing a select element: <select> <option value="one">One</option> <option value="two">Two< ...

Customizing the colors of the Input field in the Material UI Text Field component with CSS styling can elevate the overall

import { TextField } from "@mui/material"; import { FunctionComponent } from "react"; interface IProps { type: string; label: string; color: | "error" | "primary" | "secondary" | &quo ...

Find the variance between today's date and a selected date, then initiate the timer based on this variance

I have a grid containing data. I utilize the loadGrid() function to preload data or conditions before the grid finishes loading. When the active state is set to 1, my intention is to initiate a timer by calculating the difference between the current date ...

Leverage the keyof operator for automatic determination of return type

My interface looks like this: interface ResourceState<ItemType> { rows: ItemType[], store: Record<String, ItemType> } To create a root state, I use the following structure: RootState{ car: ResourceState<Car> user: ResourceState<User&g ...

retrieve information from Angular service

Is there a way for parent components to communicate with child components by injecting providers directly into the TypeScript file of each child component? I am trying to retrieve data using get and set methods, but I am unsure how to proceed. Any suggesti ...

The function is failing to return the expected value received from the observable subscription

I am attempting to verify the existence of a user in an Angular's in-memory API by validating their username. The function checkUsernameExists(username) is supposed to return an Observable<boolean> based on whether the API responds with undefine ...