O'Reilly logo

NativeScript for Angular Mobile Development by Nathanael J. Anderson, Nathan Walker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Solution #1: Unexpected value 'SlimSliderDirective...'

Consider the first complete error mentioned in the preceding section:

ERROR in Unexpected value 'SlimSliderDirective in /path/to/TNSStudio/app/modules/player/directives/slider.directive.d.ts' declared by the module 'PlayerModule in /path/to/TNSStudio/app/modules/player/player.module.ts'. Please add a @Pipe/@Directive/@Component annotation.

The solution to the preceding error is to install an additional webpack plugin:

npm install nativescript-webpack-import-replace --save-dev

Then, open webpack.config.js and configure the plugin as follows:

function getPlugins(platform, env) {    let plugins = [      ...      new ImportReplacePlugin({          platform: platform,          files: [              'slider.directive'          ]      }),      ...

This ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required