jQWidgets Forums
jQuery UI Widgets › Forums › Angular › jQWidgets Angular App
Tagged: error compiling demo app
This topic contains 4 replies, has 2 voices, and was last updated by pwenk 7 years, 5 months ago.
-
AuthorjQWidgets Angular App Posts
-
I installed the create-jqwidgets-angular-app from your document-angular site from scratch.
Install 8.9.1 LTS
sudo npm install -g create-jqwidgets-angular-app
create-jqwidgets-angular-app my-app
cd my-app—————————————————————————————————-
npm start
—————————————————————————————————-
> my-app@0.1.0 start /Users/pwenk/Desktop/angular_cli_example/my-app
> ng serve** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
Date: 2017-11-30T12:54:53.364Z
Hash: b2ad013e29257619d739
Time: 4146ms
chunk {inline} inline.bundle.js (inline) 5.79 kB [entry] [rendered]
chunk {main} main.bundle.js (main) 3 kB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js (polyfills) 636 bytes [initial] [rendered]
chunk {styles} styles.bundle.js (styles) 911 kB [initial] [rendered]
chunk {vendor} vendor.bundle.js (vendor) 855 kB [initial] [rendered]ERROR in Error: No NgModule metadata found for ‘AppModule’.
at NgModuleResolver.resolve (/Users/pwenk/Desktop/angular_cli_example/my-app/node_modules/@angular/compiler/bundles/compiler.umd.js:20111:23)
at CompileMetadataResolver.getNgModuleMetadata (/Users/pwenk/Desktop/angular_cli_example/my-app/node_modules/@angular/compiler/bundles/compiler.umd.js:15101:60)
at visitLazyRoute (/Users/pwenk/Desktop/angular_cli_example/my-app/node_modules/@angular/compiler/bundles/compiler.umd.js:29995:104)
at AotCompiler.listLazyRoutes (/Users/pwenk/Desktop/angular_cli_example/my-app/node_modules/@angular/compiler/bundles/compiler.umd.js:29963:20)
at AngularCompilerProgram.listLazyRoutes (/Users/pwenk/Desktop/angular_cli_example/my-app/node_modules/@angular/compiler-cli/src/transformers/program.js:157:30)
at Function.NgTools_InternalApi_NG_2.listLazyRoutes (/Users/pwenk/Desktop/angular_cli_example/my-app/node_modules/@angular/compiler-cli/src/ngtools_api.js:44:36)
at AngularCompilerPlugin._getLazyRoutesFromNgtools (/Users/pwenk/Desktop/angular_cli_example/my-app/node_modules/@angular/cli/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:246:66)
at Promise.resolve.then.then (/Users/pwenk/Desktop/angular_cli_example/my-app/node_modules/@angular/cli/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:542:50)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)webpack: Failed to compile.
—————————————————————————————————-
npm run build
—————————————————————————————————-
> my-app@0.1.0 build /Users/pwenk/Desktop/angular_cli_example/my-app
> ng build –base-href ./ –prodDate: 2017-11-30T12:59:05.752Z
Hash: 1a16b0c9f4dae47f989e
Time: 5349ms
chunk {0} styles.b2c53ab220558aba5171.bundle.css (styles) 241 kB [initial] [rendered]
chunk {1} polyfills.3bc34265385d52184eab.bundle.js (polyfills) 86 bytes [initial] [rendered]
chunk {2} main.e402deade8b026b7d50e.bundle.js (main) 84 bytes [initial] [rendered]
chunk {3} inline.d447bf3fe286ea2ea529.bundle.js (inline) 1.45 kB [entry] [rendered]ERROR in Error: TypeError: Cannot read property ‘flags’ of undefined
at checkUnreachable (/Users/pwenk/Desktop/angular_cli_example/my-app/node_modules/typescript/lib/typescript.js:24905:31)
at bindChildrenWorker (/Users/pwenk/Desktop/angular_cli_example/my-app/node_modules/typescript/lib/typescript.js:23111:17)
at bindChildren (/Users/pwenk/Desktop/angular_cli_example/my-app/node_modules/typescript/lib/typescript.js:23055:17)
at bind (/Users/pwenk/Desktop/angular_cli_example/my-app/node_modules/typescript/lib/typescript.js:24319:21)
at bindSourceFile (/Users/pwenk/Desktop/angular_cli_example/my-app/node_modules/typescript/lib/typescript.js:22689:17)
at Object.bindSourceFile (/Users/pwenk/Desktop/angular_cli_example/my-app/node_modules/typescript/lib/typescript.js:22640:9)
at initializeTypeChecker (/Users/pwenk/Desktop/angular_cli_example/my-app/node_modules/typescript/lib/typescript.js:47988:20)
at Object.createTypeChecker (/Users/pwenk/Desktop/angular_cli_example/my-app/node_modules/typescript/lib/typescript.js:27142:9)
at getDiagnosticsProducingTypeChecker (/Users/pwenk/Desktop/angular_cli_example/my-app/node_modules/typescript/lib/typescript.js:69678:93)
at /Users/pwenk/Desktop/angular_cli_example/my-app/node_modules/typescript/lib/typescript.js:69809:35
at runWithCancellationToken (/Users/pwenk/Desktop/angular_cli_example/my-app/node_modules/typescript/lib/typescript.js:69779:24)
at getSemanticDiagnosticsForFileNoCache (/Users/pwenk/Desktop/angular_cli_example/my-app/node_modules/typescript/lib/typescript.js:69802:20)
at getAndCacheDiagnostics (/Users/pwenk/Desktop/angular_cli_example/my-app/node_modules/typescript/lib/typescript.js:70033:26)
at getSemanticDiagnosticsForFile (/Users/pwenk/Desktop/angular_cli_example/my-app/node_modules/typescript/lib/typescript.js:69799:20)
at getDiagnosticsHelper (/Users/pwenk/Desktop/angular_cli_example/my-app/node_modules/typescript/lib/typescript.js:69738:24)
at Object.getSemanticDiagnostics (/Users/pwenk/Desktop/angular_cli_example/my-app/node_modules/typescript/lib/typescript.js:69751:20)npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-app@0.1.0 build:ng build --base-href ./ --prod
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-app@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in:
npm ERR! /Users/pwenk/.npm/_logs/2017-11-30T12_59_05_781Z-debug.logcan you help my please
Hi pwenk,
I’ve tested the package and it is fine. But I suggest you try, opening the
app.module.ts
file, removing the latest}
and then typing it again.
It’s a common issue. Awaiting your response!Best Regards,
IvojQWidgets Team
http://www.jqwidgets.com/Hi Ivo
it looks like the first compilation with ng serve always gives an error.
When changing the file app.module.ts a compilation will be performed automatically.
This is now running error-free, although the content of app.module.ts is the same as in the first compilation.ng build always gives an error.
My goal is to build a development environment for jqwidgets based Angular applications.
The development environment is based on PHPStorm from JetBrain which supports Angular. With the current
behavior it is not possible to build a working development environment.I hope an improvement is planned here?
Hi pwenk,
Reinstall the
create-jqwidgets-angular-app
and try again.Best Regards,
IvojQWidgets Team
http://www.jqwidgets.com/Hi Ivo,
the automatically created my-app applications is a good starting point for angular & JqWidgets projects.
Both npm start and npm run build are working fine now.many thanks for the support
-
AuthorPosts
You must be logged in to reply to this topic.