Angular SDK - Build Error

I am trying to migrate to angular. I started to follow the cumulocity documentation. I am getting this error as below when I do npm start.

C:\Users\Chandan\ChandanTestAngular\testapp>npm start

testapp@1.0.0 start C:\Users\Chandan\ChandanTestAngular\testapp
c8ycli server

Proxying requests to remote instance http://demos.cumulocity.com

http://localhost:9000/apps/testapp/ 98 % - after emitting

× ?wdm?: Hash: c67a693e0926e2587fcd
Version: webpack 4.30.0
Time: 3770ms
Built at: 06/06/2019 11:57:59 AM
chunk {app} app.js (app) 268 bytes <{bootstrap}> [rendered]
chunk {bootstrap} bootstrap.js (bootstrap) 140 KiB >{app}< >{vendors~branding}< [entry] [rendered]
chunk {vendors~branding} vendors~branding.js (vendors~branding) 1.83 MiB <{bootstrap}> [rendered] split chunk (cache group: vendors) (name: vendors~branding)

ERROR in ./index.ts 7:8
Module parse failed: Unexpected token (7:8)
You may need an appropriate loader to handle this file type.
| import { AppModule } from ‘./app.module’;
|

declare const MODE: string;
| if (MODE === ‘production’) {
| enableProdMode();
@ ./node_modules/@c8y/cli/dist/app-bootstrap/index.js 68:41-92
Child html-webpack-plugin for “index.html”:
chunk {0} index.html 529 KiB [entry] [rendered]
i ?wdm?: Failed to compile.

I did remove npm and reinstall, and tried again. The issue is still there.

Hi,

may I ask why you use demos.cumulocity.com as this is the Cumulocity demo tenant?

best regards
Michael

Hi Michael,

I am able to build successfully now. I could successfully deploy the app.

Thanks

Hi,

i am getting same error while building starting application,

anybody know how to resolve it.

chunk {app} app.js (app) 340 bytes <{bootstrap}> [rendered]
chunk {bootstrap} bootstrap.js (bootstrap) 140 KiB >{app}< >{branding}< >{vendors~branding}< [entry]
chunk {branding} branding.js (branding) 2.12 MiB <{bootstrap}> ={vendors~branding}=
chunk {vendors~branding} vendors~branding.js (vendors~branding) 10.9 KiB <{bootstrap}> ={branding}= split chunk (cache group: vendors) (name: vendors~branding)
ERROR in ./index.ts 10:8
Module parse failed: Unexpected token (10:8)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| import ‘./locales/pt_BR.po’; | > declare const MODE : string;
|
| if (MODE === ‘production’) {
@ ./node_modules/@c8y/cli/dist/app-bootstrap/index.js 68:41-92
Child html-webpack-plugin for “index.html”:
chunk {1} index.html 529 KiB [entry]
i ?wdm?: Failed to compile.

Hi Balaji,

it would be great to understand what solved the issue for you last time. Maybe this will help with startup as well.

best regard
Michael