jonaszuberbuehler / ion-affix

A directive for Ionic framework for creating affix headers.
MIT License
57 stars 20 forks source link

Module not found: Error: Can't resolve 'ionic-angular' #32

Closed leabdalla closed 4 years ago

leabdalla commented 4 years ago

When I try to compile my project, it shows this error:

[ng] 「wdm」: Compiling...
[ng] Date: 2019-10-02T14:40:47.994Z - Hash: b9e64c35ab5a9188197d - Time: 2864ms
[ng] 117 unchanged chunks
[ng]
[ng] ERROR in ./node_modules/ion-affix/dist/directives/adapters/adapter-factory.js
[ng] Module not found: Error: Can't resolve 'ionic-angular' in '/Users/myuser/dev/myapp/node_modules/ion-affix/dist/directives/adapters'

Here is my Ionic info:

Ionic:

   Ionic CLI                     : 5.4.2 (/Users/myuser/.nvm/versions/node/v10.16.3/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.10.0
   @angular-devkit/build-angular : 0.13.9
   @angular-devkit/schematics    : 7.3.9
   @angular/cli                  : 7.3.9
   @ionic/angular-toolkit        : 1.5.1

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.1.0, browser 6.0.0, ios 5.0.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.2, (and 5 other plugins)

Utility:

   cordova-res : 0.6.0
   native-run  : 0.2.8

System:

   Android SDK Tools : 26.1.1 (/Users/myuser/Library/Android/sdk)
   ios-deploy        : 1.9.4
   ios-sim           : 8.0.2
   NodeJS            : v10.16.3 (/Users/myuser/.nvm/versions/node/v10.16.3/bin/node)
   npm               : 6.9.0
   OS                : macOS Mojave
   Xcode             : Xcode 11.0 Build version 11A420a

Am I doing something wrong?

invot commented 4 years ago

I have the same issue. Changing the first line of adapter-factory.js allows the plugin to compile (with warnings):

from: import { Content, Scroll } from 'ionic-angular';

to: import { Content, Scroll } from '@ionic/angular';

invot commented 4 years ago

https://github.com/jonaszuberbuehler/ion-affix/compare/master...invot:patch-1