Quantcast
Channel: Ionic Forum - Latest topics
Viewing all 70434 articles
Browse latest View live

Ionic-docs OFFLINE Version

$
0
0

@softwarekoch wrote:

Hi,

i tried to install ionic-docs as OFFLINE Version but always get 6 WARNINGS and 1 ERROR.
Does anyone knows how to get rid of this problem because i really need a offline version to
learn ionic.

Krgds Dietmar

koch@UX305LA-FC075T:~/ionic/ionic-docs$ sudo npm start

ionic-docs@1.0.0 prestart /home/koch/ionic/ionic-docs
npm run -s build-all

:heavy_check_mark: Pages
:heavy_check_mark: Build static pages
:heavy_check_mark: Build API pages
:heavy_check_mark: Build CLI pages
:heavy_check_mark: Build native pages
:heavy_check_mark: Menus
:heavy_check_mark: Build CLI command menu
:heavy_check_mark: Build native plugins menu
:heavy_check_mark: Data
:heavy_check_mark: Build API reference data
:heavy_check_mark: Build search index
[46:37.5] @stencil/core v0.17.0 :key:
[46:37.5] build, app, prod mode, started …
[46:37.6] transpile started …
[46:37.7] transpile finished in 79 ms
[46:39.0] module map started …
[46:39.0] generate styles started …
[46:40.4] compile global style start …
[46:40.5] compile global style finish in 141 ms
[46:40.5] generate styles finished in 1.51 s
[46:42.0] module map finished in 3.02 s
[46:42.0] generate bundles started …
[46:42.1] generate bundles finished in 60 ms
[46:42.1] generate app files started …
[46:42.2] generate app files finished in 134 ms

[ WARN ] build warn: /home/koch/ionic/ionic-docs/preview-app/src/infinite-scroll
multiple components found in: /home/koch/ionic/ionic-docs/preview-app/src/infinite-scroll

[ WARN ] build warn: /home/koch/ionic/ionic-docs/preview-app/src/menu
multiple components found in: /home/koch/ionic/ionic-docs/preview-app/src/menu

[ WARN ] build warn: /home/koch/ionic/ionic-docs/preview-app/src/modal
multiple components found in: /home/koch/ionic/ionic-docs/preview-app/src/modal

[ WARN ] build warn: /home/koch/ionic/ionic-docs/preview-app/src/nav
multiple components found in: /home/koch/ionic/ionic-docs/preview-app/src/nav

[ WARN ] build warn: /home/koch/ionic/ionic-docs/preview-app/src/popover
multiple components found in: /home/koch/ionic/ionic-docs/preview-app/src/popover

[46:44.6] build finished in 7.06 s

ionic-docs@1.0.0 start /home/koch/ionic/ionic-docs
stencil build --dev --serve --watch --es5

[46:45.3] @stencil/core v0.17.0 :key:

[ WARN ] Generating ES5 during development is a very task expensive, initial and incremental builds will be much
slower. Drop the ‘–es5’ flag and use a modern browser for development. If you need ESM output, use the
‘–esm’ flag instead.

[46:45.4] build, app, dev mode, started …
[46:45.7] transpile started …
[46:45.8] transpile finished in 97 ms
[46:46.0] module map started …
[46:46.0] generate styles started …
[46:46.3] compile global style start …
[46:46.4] compile global style finish in 84 ms
[46:46.4] generate styles finished in 388 ms

[ ERROR ] unhandledRejection Exited with code 3 Error: Exited with code 3 at ChildProcess.o.once.r
(/home/koch/ionic/ionic-docs/node_modules/@stencil/core/dist/sys/node/index.js:1:583069) at
Object.onceWrapper (events.js:273:13) at ChildProcess.emit (events.js:182:13) at maybeClose
(internal/child_process.js:962:16) at Socket.stream.socket.on (internal/child_process.js:381:11) at
Socket.emit (events.js:182:13) at Pipe._handle.close (net.js:610:12)

[46:47.7] module map finished in 1.66 s
[46:47.7] generate bundles started …
[46:47.7] generate bundles finished in 17 ms
[46:47.7] generate app files started …
[46:47.7] generate app files finished in 39 ms
[46:48.4] dev server: http://localhost:3333/docs/
[46:48.4] build finished, watching for changes… in 3.04 s

Posts: 1

Participants: 1

Read full topic


Ionic 3 local notification sounds not working

$
0
0

@fawsan54 wrote:

below is my code
notifications all are coming but sounds not working

this.localNotifications.schedule({
id: 1,
text: ‘Single ILocalNotification’,
vibrate: true,
sound: ‘file://assets/sounds/shorte.mp3’,
led:‘00FFFF’
});

please help i am trying from 2 days not working
checking android version android 8.0

Posts: 1

Participants: 1

Read full topic

Error when run fuction selectall checkbox

$
0
0

@andreasTedja wrote:

Dear All,

i got error when i click select all.
please help me to fix this problem.

<ion-content padding class="page-shop-cart">
    <span>
        <label>Check All</label>
        <ion-checkbox (click)="checkAll()"></ion-checkbox>
    </span>
<div class="card-list" *ngFor="let takeData of sale">
<span>
        <ion-checkbox [(ngModel)]="takeData.checked" (click)="selectMember(takeData)"></ion-checkbox>
  </span>

.ts

checkAll(){
  this.storage.get('sale').then((val => {
       this.sale = val;
       console.log(this.sale);
  
  for(let i =0; i <= this.sale.length; i++) {
   
    this.sale[i].checked = true;

  }    
 console.log(this.sale);
}
   }));

data json:

error log 1;


error log 2

thank you all

Posts: 1

Participants: 1

Read full topic

In ionic 3 project can't able import plugin in app module

How to switch ionic v3 to v4?

Error in app

$
0
0

@josapinc wrote:

hello team, I have an error that I still can not solve, when I run it on the cli, everything runs normally, but when I run it on a mobile device, it generates errors.
suddenly someone knows how to solve.

This is my code
image

this is the error that show me in the console
image

Posts: 1

Participants: 1

Read full topic

GoogleAnalytics plugin Error: ts: Cannot find name 'GoogleAnalytics'

$
0
0

@mosta2 wrote:

I am trying to use Google Analytics plugin on Ionic, the documentation code is not applicable as when I use:

constructor(private ga: GoogleAnalytics)

the editor says “ts: Cannot find name ‘GoogleAnalytics’” however it can see some Object GoogleAnalyticsOriginal instead which compiles but does not work (gives error on runtime).

These are system specs ionic (Ionic CLI) : 4.5.0

Ionic Framework : ionic-angular 3.9.2

@ionic/app-scripts : 3.2.1

Cordova: cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)

Cordova Platforms : android 7.1.4

Cordova Plugins : cordova-plugin-ionic-webview 1.1.1, (and 15 other plugins) System:

NodeJS : v10.13.0 (C:\Program Files\nodejs\node.exe)

npm : 6.5.0

Thanks

Posts: 1

Participants: 1

Read full topic

The $ does not work (ionic 4)

$
0
0

@louis5017 wrote:

Hello everyone, i’m using epubjs, since i want to modify an epub i’m trying to modify it with
var html = $(“iframe”).contents().find(“body”);

but when I do console.log(html); this return me ERROR ReferenceError: $ is not defined
does anyone got a solution?

Posts: 1

Participants: 1

Read full topic


Develop in ionic3 for wearable devices (Android, iOS)

$
0
0

@Sermod wrote:

I have an ionic 3 app who shown markers on a map. But now I have a new request for the app to port it to wereable devices (Android wear and Apple watch). Show the markers in a map on the watch and some info…

My app just get geometry points from webService and shown it on map. I like to reply that functionality in android wear and apple watch, just see a map with markers.

I googled a lot and I found:

I need to develop for android and iOS wereables at the time (if it is posible) with ionic 3. It is posible?

Or Do I need to develop in other platform and add the code to my compiled app?

Thanks.

Posts: 1

Participants: 1

Read full topic

Ionic3 HTTP native

$
0
0

@kirantunerlabs wrote:

Hi team,

I am facing an issue with ionic3 native HTTP client. I am getting the following error.

 {"__zone_symbol__currentTask":{"type":"microTask","state":"notScheduled","source":"Promise.then","zone":"angular","cancelFn":null,"runCount":0}}

May I know what is the issue and how can I resolve it.

Thanks

Posts: 3

Participants: 2

Read full topic

Ionic-native error

$
0
0

@Elgenidi wrote:

When I install any ionic-native plugin this error appears especially with  @ionic-native/media-capture @ionic-native/media @ionic-native/file


App module.ts

import { BrowserModule } from ‘@angular/platform-browser’;
import { ErrorHandler, NgModule } from ‘@angular/core’;
import { IonicApp, IonicErrorHandler, IonicModule } from ‘ionic-angular’;
import { SplashScreen } from ‘@ionic-native/splash-screen’;
import { StatusBar } from ‘@ionic-native/status-bar’;

import { MyApp } from ‘./app.component’;
import { HomePage } from ‘…/pages/home/home’;

import { MediaCapture } from ‘@ionic-native/media-capture/ngx’;
import { Media } from ‘@ionic-native/media/ngx’;
import { File } from ‘@ionic-native/file/ngx’;

import { IonicStorageModule } from ‘@ionic/storage’;

@NgModule({
declarations: [
MyApp,
HomePage
],
imports: [
BrowserModule,
IonicModule.forRoot(MyApp),
IonicStorageModule.forRoot()
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
HomePage
],
providers: [
StatusBar,
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler},
MediaCapture,
Media,
File
]
})
export class AppModule {}

home.ts

import { Component , ViewChild } from ‘@angular/core’;
import { NavController } from ‘ionic-angular’;

import { MediaCapture, MediaFile, CaptureError, CaptureVideoOptions } from ‘@ionic-native/media-capture/ngx’;
import { Storage } from ‘@ionic/storage’;
import { Media, MediaObject } from ‘@ionic-native/media/ngx’;
import { File } from ‘@ionic-native/file/ngx’

const MEDIA_FILES_KEY = ‘mediaFiles’;

@Component({
selector: ‘page-home’,
templateUrl: ‘home.html’
})
export class HomePage {

mediaFiles = ;
@ViewChild(‘myvideo’) myVideo: any;

constructor(public navCtrl: NavController, private mediaCapture: MediaCapture, private storage: Storage, private file: File, private media: Media) {

}

ionViewDidLoad() {
this.storage.get(MEDIA_FILES_KEY).then(res => {
this.mediaFiles = JSON.parse(res) || ;
})
}

captureAudio() {
this.mediaCapture.captureAudio().then(res => {
this.storeMediaFiles(res);
}, (err: CaptureError) => console.error(err));
}

captureVideo() {
let options: CaptureVideoOptions = {
limit: 1,
duration: 30
}
this.mediaCapture.captureVideo(options).then((res: MediaFile) => {
let capturedFile = res[0];
let fileName = capturedFile.name;
let dir = capturedFile[‘localURL’].split(’/’);
dir.pop();
let fromDirectory = dir.join(’/’);
var toDirectory = this.file.dataDirectory;

  this.file.copyFile(fromDirectory , fileName , toDirectory , fileName).then((res) => {
    this.storeMediaFiles([{name: fileName, size: capturedFile.size}]);
  },err => {
    console.log('err: ', err);
  });
      },
(err: CaptureError) => console.error(err));

}

play(myFile) {
if (myFile.name.indexOf(’.wav’) > -1) {
const audioFile: MediaObject = this.media.create(myFile.localURL);
audioFile.play();
} else {
let path = this.file.dataDirectory + myFile.name;
let url = path.replace(/^file:///, ‘’);
let video = this.myVideo.nativeElement;
video.src = url;
video.play();
}
}

storeMediaFiles(files) {
this.storage.get(MEDIA_FILES_KEY).then(res => {
if (res) {
let arr = JSON.parse(res);
arr = arr.concat(files);
this.storage.set(MEDIA_FILES_KEY, JSON.stringify(arr));
} else {
this.storage.set(MEDIA_FILES_KEY, JSON.stringify(files))
}
this.mediaFiles = this.mediaFiles.concat(files);
})
}

}


home.html

<ion-header>

<ion-navbar>

<ion-title>

Ionic Sound Recorder

</ion-title>

</ion-navbar>

</ion-header>

<ion-content >

<ion-row>

<ion-col>

<button ion-button full (click)=“captureAudio()”>Capture Audio</button>

</ion-col>

<ion-col>

<button ion-button full (click)=“captureVideo()”>Capture Video</button>

</ion-col>

</ion-row>

<ion-list>

<ion-item *ngFor=“let file of mediaFiles” tappable (click)=“play(file)” text-wrap>

{{ file.name }}

<p>{{ file.size / 1000 / 1000 | number }} MB</p>

</ion-item>

</ion-list>

<video controls autoplay #myvideo>

</video>

</ion-content>

Posts: 1

Participants: 1

Read full topic

Ionic native plugin error

$
0
0

@Elgenidi wrote:

When I install any ionic-native plugin this error appears especially with @ionic-native/media-capture @ionic-native/media @ionic-native/file

App Module.ts

import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { SplashScreen } from '@ionic-native/splash-screen';
import { StatusBar } from '@ionic-native/status-bar';

import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';

import { MediaCapture } from '@ionic-native/media-capture/ngx';
import { Media } from '@ionic-native/media/ngx';
import { File } from '@ionic-native/file/ngx';


import { IonicStorageModule } from '@ionic/storage';

@NgModule({
  declarations: [
    MyApp,
    HomePage
  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(MyApp),
    IonicStorageModule.forRoot()
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    HomePage
  ],
  providers: [
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler},
    MediaCapture,
    Media,
    File
  ]
})
export class AppModule {}

home page ts

import { Component , ViewChild } from '@angular/core';
import { NavController } from 'ionic-angular';

import { MediaCapture, MediaFile, CaptureError, CaptureVideoOptions } from '@ionic-native/media-capture/ngx';
import { Storage } from '@ionic/storage';
import { Media, MediaObject } from '@ionic-native/media/ngx';
import { File } from '@ionic-native/file/ngx'

const MEDIA_FILES_KEY = 'mediaFiles';

@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {


  mediaFiles = [];
  @ViewChild('myvideo') myVideo: any;

  constructor(public navCtrl: NavController, private mediaCapture: MediaCapture, private storage: Storage, private file: File, private media: Media) {

  }

  ionViewDidLoad() {
    this.storage.get(MEDIA_FILES_KEY).then(res => {
      this.mediaFiles = JSON.parse(res) || [];
    })
  }
 
  captureAudio() {
    this.mediaCapture.captureAudio().then(res => {
      this.storeMediaFiles(res);
    }, (err: CaptureError) => console.error(err));
  }
 
  captureVideo() {
    let options: CaptureVideoOptions = {
      limit: 1,
      duration: 30
    }
    this.mediaCapture.captureVideo(options).then((res: MediaFile[]) => {
      let capturedFile = res[0];
      let fileName = capturedFile.name;
      let dir = capturedFile['localURL'].split('/');
      dir.pop();
      let fromDirectory = dir.join('/');      
      var toDirectory = this.file.dataDirectory;
      
      this.file.copyFile(fromDirectory , fileName , toDirectory , fileName).then((res) => {
        this.storeMediaFiles([{name: fileName, size: capturedFile.size}]);
      },err => {
        console.log('err: ', err);
      });
          },
    (err: CaptureError) => console.error(err));
  }
 
  play(myFile) {
    if (myFile.name.indexOf('.wav') > -1) {
      const audioFile: MediaObject = this.media.create(myFile.localURL);
      audioFile.play();
    } else {
      let path = this.file.dataDirectory + myFile.name;
      let url = path.replace(/^file:\/\//, '');
      let video = this.myVideo.nativeElement;
      video.src = url;
      video.play();
    }
  }
 
  storeMediaFiles(files) {
    this.storage.get(MEDIA_FILES_KEY).then(res => {
      if (res) {
        let arr = JSON.parse(res);
        arr = arr.concat(files);
        this.storage.set(MEDIA_FILES_KEY, JSON.stringify(arr));
      } else {
        this.storage.set(MEDIA_FILES_KEY, JSON.stringify(files))
      }
      this.mediaFiles = this.mediaFiles.concat(files);
    })
  }

}

home HTML

<ion-header>
  <ion-navbar>
    <ion-title>
      Ionic Sound Recorder
    </ion-title>
  </ion-navbar>
</ion-header>

<ion-content >
  <ion-row>
    <ion-col>
      <button ion-button full (click)="captureAudio()">Capture Audio</button>
    </ion-col>
    <ion-col>
      <button ion-button full (click)="captureVideo()">Capture Video</button>
    </ion-col>
  </ion-row>
 
  <ion-list>
    <ion-item *ngFor="let file of mediaFiles" tappable (click)="play(file)" text-wrap>
      {{ file.name }}
      <p>{{ file.size / 1000 / 1000 | number }} MB</p>
    </ion-item>
  </ion-list>
 
  <video controls autoplay #myvideo>
  </video>
</ion-content>

Posts: 1

Participants: 1

Read full topic

Ionic 4 json data pull

$
0
0

@muratcankuruoffical wrote:

export class BtcService {
	  public todos: todo[] = [];

	constructor () {
		    // Set some test todos
    this.todos = [
      { id: 'todo-one', title: 'Todo One', description: 'Do Stuff' },
      { id: 'todo-two', title: 'Todo Two', description: 'Do Stuff' },
      { id: 'todo-three', title: 'Todo Three', description: 'Do Stuff' },
      { id: 'todo-four', title: 'Todo Four', description: 'Do Stuff' },
      { id: 'todo-five', title: 'Todo Five', description: 'Do Stuff' },
      { id: 'todo-six', title: 'Todo Six', description: 'Do Stuff' },
      { id: 'todo-seven', title: 'Todo Seven', description: 'Do Stuff' }
    ];

  }

like this
how same json data pull ??? https://api.coinmarketcap.com/v1/ticker/

Posts: 1

Participants: 1

Read full topic

Prevent auto scaling width of Image in Ionic 4

$
0
0

@LucemCode wrote:

Hallo!

I would like to show an Image in my Ionic 4 App wich is dynamically zoomable.
I tried to use the <img> Tag. But every time my Image hits the right side, the Image width gets automatically scaled to fit the display width.
Is it possible to prevent this?

Thanks.

Posts: 1

Participants: 1

Read full topic

IONIC V4 - How I use my custom spinner?


Ionic v4 / Error: Arguments array must have arguments. Help me please

$
0
0

@muratcankuruoffical wrote:

btcservice.ts page

import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';


@Injectable({
  providedIn: 'root'
})
export class BtcService {
	  public items:any;

	constructor (public navCtrl: NavController, public http: HttpClient) {
		 this.getData();
  }
    getData(){
    
    let data: Observable<any> = this.http.get('https://api.coinmarketcap.com/v1/ticker/');
    data.subscribe(result =>  {
      this.items = result;
    });
  } 


}

home.page.ts page

import { Component } from '@angular/core';
import { NavController, ModalController } from '@ionic/angular';
import { HttpClient } from '@angular/common/http';
import { Observable, throwError } from 'rxjs';
import { CurrencyPage } from '../currency/currency.page';
import { Router } from '@angular/router';
import { BtcService } from '../btc.service';
//import { Push, PushObject, PushOptions } from '@ionic-native/push';

@Component({
  selector: 'app-home',
  templateUrl: 'home.page.html',
  styleUrls: ['home.page.scss'],
})
export class HomePage {
  constructor(private BtcService: BtcService){
	  
  }
}

home.page.html

<ion-list>
 <ion-item [href]="'/currency/' + todo.id" detail="true" *ngFor="let item of BtcService.items">
{{item.id}}
</ion-item>


</ion-list>

Error not:

ERROR Error: Uncaught (in promise): Error: Arguments array must have arguments.
Error: Arguments array must have arguments.
at injectArgs (core.js:1804)
at core.js:15509
at callFactory (core.js:21182)
at createProviderInstance (core.js:21140)
at resolveNgModuleDep (core.js:21115)
at NgModuleRef
.push…/node_modules/@angular/core/fesm5/core.js.NgModuleRef
.get (core.js:21809)
at resolveNgModuleDep (core.js:21120)
at NgModuleRef_.push…/node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:21809)
at resolveDep (core.js:22180)
at createClass (core.js:22052)
at injectArgs (core.js:1804)
at core.js:15509
at callFactory (core.js:21182)
at createProviderInstance (core.js:21140)
at resolveNgModuleDep (core.js:21115)
at NgModuleRef
.push…/node_modules/@angular/core/fesm5/core.js.NgModuleRef
.get (core.js:21809)
at resolveNgModuleDep (core.js:21120)
at NgModuleRef_.push…/node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:21809)
at resolveDep (core.js:22180)
at createClass (core.js:22052)
at resolvePromise (zone.js:831)
at resolvePromise (zone.js:788)
at zone.js:892
at ZoneDelegate.push…/node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)
at Object.onInvokeTask (core.js:17280)
at ZoneDelegate.push…/node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:422)
at Zone.push…/node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:195)
at drainMicroTaskQueue (zone.js:601)
defaultErrorLogger @ core.js:15714
push…/node_modules/@angular/core/fesm5/core.js.ErrorHandler.handleError @ core.js:15762
next @ core.js:17761
schedulerFn @ core.js:13504
push…/node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.__tryOrUnsub @ Subscriber.js:196
push…/node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.next @ Subscriber.js:134
push…/node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._next @ Subscriber.js:77
push…/node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:54
push…/node_modules/rxjs/_esm5/internal/Subject.js.Subject.next @ Subject.js:47
push…/node_modules/@angular/core/fesm5/core.js.EventEmitter.emit @ core.js:13488
(anonymous) @ core.js:17311
push…/node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ zone.js:391
push…/node_modules/zone.js/dist/zone.js.Zone.run @ zone.js:150
push…/node_modules/@angular/core/fesm5/core.js.NgZone.runOutsideAngular @ core.js:17248
onHandleError @ core.js:17311
push…/node_modules/zone.js/dist/zone.js.ZoneDelegate.handleError @ zone.js:395
push…/node_modules/zone.js/dist/zone.js.Zone.runGuarded @ zone.js:164
_loop_1 @ zone.js:694
api.microtaskDrainDone @ zone.js:703
drainMicroTaskQueue @ zone.js:608
Promise.then (async)
scheduleMicroTask @ zone.js:584
push…/node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:413
onScheduleTask @ zone.js:301
push…/node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:404
push…/node_modules/zone.js/dist/zone.js.Zone.scheduleTask @ zone.js:238
push…/node_modules/zone.js/dist/zone.js.Zone.scheduleMicroTask @ zone.js:258
scheduleResolveOrReject @ zone.js:879
resolvePromise @ zone.js:825
(anonymous) @ zone.js:741
webpackJsonpCallback @ bootstrap:25
(anonymous) @ home-home-module.js:1

Posts: 1

Participants: 1

Read full topic

How to record radio stream?

Ionic firebase offline login?

$
0
0

@codiqa100095421 wrote:

Hello, I have auth firebase to enter my android app, but if i m offline i can’t use it , how can i login offline?
(ionic 4)

Thanks

Posts: 1

Participants: 1

Read full topic

Ionic 3 can't use any native plugins

$
0
0

@pavel_savchuk wrote:

HI, I am trying to add a plugin to my existing ionic 3 app and do exactly like it is written here.

After trying to execute the code

this.toast.show(`I'm a toast`, '5000', 'center').subscribe(
  toast => {
    console.log(toast);
  }
);

I am getting an error

ERROR TypeError: Object(...) is not a function
    at Toast.show (index.js:28)

I tried:

  1. to include a plugin like that
    import { Toast } from '@ionic-native/toast/ngx';
  2. to install new rxjs
    npm install rxjs@6 rxjs-compat@6 --save

and also put it to app.modules.ts and adding it to providers array. It still produces the error above.

My ionic info:

cli packages: (C:\Users\Kesselring\AppData\Roaming\npm\node_modules)
    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:
    cordova (Cordova CLI) : 7.1.0

local packages:
    @ionic/app-scripts : 3.2.1
    Cordova Platforms  : none
    Ionic Framework    : ionic-angular 3.9.2

System:
    Android SDK Tools : 26.1.1
    Node              : v8.9.3
    npm               : 5.3.0
    OS                : Windows 7

Environment Variables:
    ANDROID_HOME : D:\Android\Sdk

Misc:
    backend : pro

This relates to all new plugins I want to add to my project since 28 January 2019
I cannot afford to transition the whole app to Ionic 4. How to use these plugins? Please help.

Posts: 1

Participants: 1

Read full topic

I'm new to ionic...facing problem while installing ionic in MacBook

$
0
0

@gokulanathan wrote:

Amalanathans-MacBook-Pro:~ angelamal$ npm install -g ionic

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/ionic

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules

npm ERR! path /usr/local/lib/node_modules/ionic

npm ERR! code EACCES

npm ERR! errno -13

npm ERR! syscall access

npm ERR! Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules/ionic’

npm ERR! { [Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules/ionic’]

npm ERR! stack:

npm ERR! ‘Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules/ionic’’,

npm ERR! errno: -13,

npm ERR! code: ‘EACCES’,

npm ERR! syscall: ‘access’,

npm ERR! path: ‘/usr/local/lib/node_modules/ionic’ }

npm ERR!

npm ERR! The operation was rejected by your operating system.

npm ERR! It is likely you do not have the permissions to access this file as the current user

npm ERR!

npm ERR! If you believe this might be a permissions issue, please double-check the

npm ERR! permissions of the file and its containing directories, or try running

npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:

npm ERR! /Users/angelamal/.npm/_logs/2019-01-29T11_56_19_678Z-debug.log

Amalanathans-MacBook-Pro:~ angelamal$ sudo npm install -g ionic

Password:

/usr/local/bin/ionic -> /usr/local/lib/node_modules/ionic/bin/ionic

  • ionic@4.9.0

updated 1 package in 12.929s

Posts: 1

Participants: 1

Read full topic

Viewing all 70434 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>