Error during ionic cordova run android --prod --release

I have the following error during this command:

[15:07:24]  uglifyjs started ...
[WARN] Error occurred during command execution from a CLI plugin (@ionic/cli-plugin-cordova).
Error: Unexpected token: name (Data) in C:\Users\kkrawczyk\Desktop\Grindy\trunk\MobileApp\Work\www\build\main.js at line 28429, col 4, pos 987327

Post your ionic info output please.
Do you have (Data) in your code somewhere?

cli packages: (C:\Users\kkrawczyk\Desktop\Grindy\trunk\MobileApp\Work\node_modules)

    @ionic/cli-plugin-cordova       : 1.6.2
    @ionic/cli-plugin-ionic-angular : 1.4.1
    @ionic/cli-utils                : 1.7.0
    ionic (Ionic CLI)               : 3.7.0

global packages:

    Cordova CLI : 7.0.1

local packages:

    @ionic/app-scripts : 1.3.11
    Cordova Platforms  : android 6.2.3 browser 4.1.0 ios 4.4.0
    Ionic Framework    : ionic-angular 3.5.0

System:

    Android SDK Tools : 26.0.2
    Node              : v6.11.0
    OS                : Windows 10
    npm               : 5.3.0

I have something like this once:

this.navCtrl.push(ProjectDetailsPage, {
                  project: fnd
                }).then((data) => {

and

resolve(data);

or (data) as a function parameter
also I am using provider with name: Data

You should upgrade these to current versions. (Note the breaking changes with app-scripts 2.x in the changelog)

After updates I have another error:

Error: Uglify failed: Unexpected token: name (settings_Settings) in undefined at line undefined, col undefined, pos undefined
settings

is a name of one of my providers, might it be related?

Do you have this string anywhere?
Do you also have a page “settings”? Are you working with the names of pages in your code somewhere?

I dont have this string, but I do have SettingsPage(not settings), I refer to Settings provider in lots of places but I dont do this with SettingsPage
and I refer to settings provider as settingsService