Especializa / nativescript-ng-shadow

Angular directive to apply shadows to native elements according to the elevation level guidelines of material design specification
Apache License 2.0
54 stars 38 forks source link

Webpack failure #6

Open skhye05 opened 6 years ago

skhye05 commented 6 years ago

I am running webpack command for android and I am getting this error

`ERROR in Unexpected value 'NgShadowModule in /node_modules/nativescript-ng-shadow/angular/ng-shadow.module.d.ts' imported by the module 'AppModule in app/app.module.ts'. Please add a @NgModule annotation.

ERROR in ./main.aot.ts Module not found: Error: Can't resolve './app.module.ngfactory' in '...App\app' @ ./main.aot.ts 5:29-62

souly1 commented 6 years ago

any update on this?

berardo commented 6 years ago

There's a chance of problem with AOT. Will look into it. Mind sharing a small project with your scenario so I can reproduce it easily?

Thanks

gabitoesmiapodo commented 6 years ago

Same problem here.

gabitoesmiapodo commented 6 years ago

Nevermind, I modified _nodemodules/nativescript-ng-shadow/angular/ng-shadow.module.d.ts

and it works now.

import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';

@NgModule({
    imports: [],
    schemas: [
        NO_ERRORS_SCHEMA
    ]
})

export declare class NgShadowModule {
}

You will obviously lose these changes if you delete your node_modules folder, but it could be included in a next version, a pull request, or a fork.

artberri commented 6 years ago

Uhm... @gabitoesmiapodo That works for you? I mean, it compiles but for me it doesn't work after doing that.

@berardo Maybe this could help? https://medium.com/@isaacplmann/getting-your-angular-2-library-ready-for-aot-90d1347bcad https://blog.angularindepth.com/making-your-angular-2-library-statically-analyzable-for-aot-e1c6f3ebedd5

JoshDSommer commented 6 years ago

@berardo I've created a PR that should allow for AOT and Web Pack compatibility, please let me know if you have any problems https://github.com/Especializa/nativescript-ng-shadow/pull/14

erkanarslan commented 6 years ago

This is still not solved.

hugocostadev commented 5 years ago

Still not solved ?
I think that this plugin is resulting a delay of navigation in Angular + NativeScript. After removing navigation become faster

mchallenger88 commented 5 years ago

I received this error on the release build of the app. I added the import suggested by @gabitoesmiapodo and the release build was successful. However, when running the app, the shadows have been stripped out of the UI.

gabitoesmiapodo commented 5 years ago

Well, my comment is from Dec 2017, so that code might be not working now.

mchallenger88 commented 5 years ago

Okay. Thanks. ;)

Pandishpan commented 5 years ago

Any quick & dirty fix for this issue? 😄

nemyagky commented 4 years ago

Subscribing to the guy above