kadoshms / ionic2-autocomplete

Ionic 2 autocomplete component
MIT License
149 stars 108 forks source link

ionic 4 dependencies fix #166

Open RELAXccc opened 5 years ago

RELAXccc commented 5 years ago

Hi, to get it working with Ionic 4 i had to manually install rxjs and edit the Import statements of index.js to:

import { Component, EventEmitter, HostListener, Injectable, Input, NgModule, Output, Pipe, ViewChild } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
import { noop as noop$1 } from 'rxjs/util/noop.d.ts';
import { Observable, Subject } from 'rxjs';
import { IonicModule } from '@ionic/angular';

greetings

LuisRodriguezDev commented 5 years ago

Hi! Can you be a little more specific about how you "manually installed rxjs"? Is there some series of steps you have to do after installing rxjs? I installed it with 'npm install rxjs' and got this error:

` [ng] ERROR in ./node_modules/rxjs/util/noop.d.ts

[ng] Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):

[ng] Error: /home/luis/Cadif1/Entrenamiento/visor_movil_ionic4/node_modules/rxjs/util/noop.d.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.

[ng] The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format (https://goo.gl/jB3GVv).

[ng] at AngularCompilerPlugin.getCompiledFile (/home/luis/Cadif1/Entrenamiento/visor_movil_ionic4/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:753:23)

[ng] at plugin.done.then (/home/luis/Cadif1/Entrenamiento/visor_movil_ionic4/node_modules/@ngtools/webpack/src/loader.js:41:31)

[ng] at process._tickCallback (internal/process/next_tick.js:68:7)

[ng] ℹ 「wdm」: Failed to compile. `

When trying to execute the command "ionic serve". Maybe I'm missing something?

charlesRms commented 5 years ago

I've got the same problem as @LuisRodriguezDev

charlesRms commented 5 years ago

I think this should make it work, in index.js :

import { Component, EventEmitter, HostListener, Injectable, Input, NgModule, Output, Pipe, ViewChild } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
import { noop as noop$1 } from 'rxjs';
import { Observable, Subject } from 'rxjs';
import { IonicModule } from '@ionic/angular';