Hi everyone! I tried to run “ionic cordova run android --prod” but I’ve got the following error in my terminal.
[19:33:28] uglifyjs started …
[WARN] Error occurred during command execution from a CLI plugin (@ionic/cli-plugin-cordova). Your plugins may be out of date.
Error: Unexpected token: name (Players) in /Volumes/Macintosh Data/IONIC_PROJECT/hukulele/www/build/main.js at line 26325, col 4, pos 888867
Here is my Players class :
import { Injectable } from '@angular/core';
import 'rxjs/add/operator/map';
@Injectable()
export class Players{
players: {name: string}[];
addPlayer(player: {name: string}){
this.players.push(player);
}
getPlayers(){
return this.players.slice();
}
setPlayers(liste: {name: string}[]){
this.players = liste;
}
initPlayers(){
this.players = [{"name":""},{"name":""},{"name":""},{"name":""},{"name":""}];
}
}
And the main.js file at line 26325 :
let Players = class Players {
addPlayer(player) {
this.players.push(player);
}
getPlayers() {
return this.players.slice();
}
setPlayers(liste) {
this.players = liste;
}
initPlayers() {
this.players = [{ "name": "" }, { "name": "" }, { "name": "" }, { "name": "" }, { "name": "" }];
}
};
Please help!