Hi Backendless team. I have uncovered a major compile issue when trying to build an angular 6 application with the --prod attribute? When this switch is added to the following command line:
ng build --prod
It results in the following fatal error:
ERROR in ./node_modules/backendless/dist/backendless.js
Module build failed (from ./node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js):
Error: Debug Failure. False expression.
at getJSDocTags (C:\Users\ssalmon\Work\testing\backendless-test\node_modules\typescript\lib\typescript.js:13197:22)
at getFirstJSDocTag (C:\Users\ssalmon\Work\testing\backendless-test\node_modules\typescript\lib\typescript.js:13205:24)
at Object.getJSDocType (C:\Users\ssalmon\Work\testing\backendless-test\node_modules\typescript\lib\typescript.js:13173:19)
at getContextualSignature (C:\Users\ssalmon\Work\testing\backendless-test\node_modules\typescript\lib\typescript.js:41002:32)
at checkFunctionExpressionOrObjectLiteralMethod (C:\Users\ssalmon\Work\testing\backendless-test\node_modules\typescript\lib\typescript.js:44621:43)
at checkExpressionWorker (C:\Users\ssalmon\Work\testing\backendless-test\node_modules\typescript\lib\typescript.js:45681:28)
at checkExpression (C:\Users\ssalmon\Work\testing\backendless-test\node_modules\typescript\lib\typescript.js:45609:42)
at checkBinaryLikeExpression (C:\Users\ssalmon\Work\testing\backendless-test\node_modules\typescript\lib\typescript.js:45155:29)
at checkBinaryExpression (C:\Users\ssalmon\Work\testing\backendless-test\node_modules\typescript\lib\typescript.js:45147:20)
at checkExpressionWorker (C:\Users\ssalmon\Work\testing\backendless-test\node_modules\typescript\lib\typescript.js:45702:28)
at checkExpression (C:\Users\ssalmon\Work\testing\backendless-test\node_modules\typescript\lib\typescript.js:45609:42)
at checkExpressionCached (C:\Users\ssalmon\Work\testing\backendless-test\node_modules\typescript\lib\typescript.js:45457:38)
at getTypeOfExpression (C:\Users\ssalmon\Work\testing\backendless-test\node_modules\typescript\lib\typescript.js:45577:28)
at checkDeclarationInitializer (C:\Users\ssalmon\Work\testing\backendless-test\node_modules\typescript\lib\typescript.js:45469:24)
at getTypeForVariableLikeDeclaration (C:\Users\ssalmon\Work\testing\backendless-test\node_modules\typescript\lib\typescript.js:30738:28)
at getWidenedTypeForVariableLikeDeclaration (C:\Users\ssalmon\Work\testing\backendless-test\node_modules\typescript\lib\typescript.js:30961:24)
Now this is a real problem trying to compile your application for production. It can easily be recreated by performing the following once you have installed the angular compiler:
ng new backendless-test
cd backendless-test
npm install backendless
modify src/app/app.component.ts to the following:
– app.component.ts start –
import { Component } from '@angular/core';
import Backendless from 'backendless';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'backendless-test';
constructor() {
Backendless.initApp('', '');
}
}
– app.component.ts end –
ng build --prod
Please could the backendless team advise how this can be solved? This is using the latest version of the SDK.
Many thanks
Steven