Angular-cli: CLI 5.0 Build Error ERROR in TypeError: staticSymbol.assertNoMembers is not a function

Created on 3 Nov 2017  Â·  18Comments  Â·  Source: angular/angular-cli

Bug Report or Feature Request (mark with an x)

- [ X] bug report -> please search issues before submitting
- [ ] feature request

Versions.

Output from: ng --version.
Angular CLI: 1.5.0
Node: 8.9.0
OS: win32 x64
Angular: 5.0.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cdk: 2.0.0-beta.12
@angular/cli: 1.5.0
@angular/flex-layout: 2.0.0-beta.10
@angular/material: 2.0.0-beta.12
@angular-devkit/build-optimizer: 0.0.32
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.35
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0
@schematics/angular: 0.1.0
typescript: 2.4.2
webpack: 3.8.1
-->

Repro steps.

Just run ng build.

Please include: commands run, packages added, related code changes.
A link to a sample repo would help too.
-->

The log given by the failure.


ERROR in TypeError: staticSymbol.assertNoMembers is not a function
at AotSummaryResolver.resolveSummary (C:\Users\Gary\WebstormProjects\ConstituentManager2\node_modules\@angular\compiler\bundles\compiler.umd.js:31928:22)
at CompileMetadataResolver._loadSummary (C:\Users\Gary\WebstormProjects\ConstituentManager2\node_modules\@angular\compiler\bundles\compiler.umd.js:14709:66)
at CompileMetadataResolver.isDirective (C:\Users\Gary\WebstormProjects\ConstituentManager2\node_modules\@angular\compiler\bundles\compiler.umd.js:15003:23)
at CompileMetadataResolver._getTypeDescriptor (C:\Users\Gary\WebstormProjects\ConstituentManager2\node_modules\@angular\compiler\bundles\compiler.umd.js:15269:18)
at C:\Users\Gary\WebstormProjects\ConstituentManager2\node_modules\@angular\compiler\bundles\compiler.umd.js:15131:78
at Array.forEach ()
at CompileMetadataResolver.getNgModuleMetadata (C:\Users\Gary\WebstormProjects\ConstituentManager2\node_modules\@angular\compiler\bundles\compiler.umd.js:15114:49)
at visitLazyRoute (C:\Users\Gary\WebstormProjects\ConstituentManager2\node_modules\@angular\compiler\bundles\compiler.umd.js:29937:104)
at AotCompiler.listLazyRoutes (C:\Users\Gary\WebstormProjects\ConstituentManager2\node_modules\@angular\compiler\bundles\compiler.umd.js:29905:20)
at AngularCompilerProgram.listLazyRoutes (C:\Users\Gary\WebstormProjects\ConstituentManager2\node_modules\@angular\compiler-cli\src\transformers\program.js:157:30)
at Function.NgTools_InternalApi_NG_2.listLazyRoutes (C:\Users\Gary\WebstormProjects\ConstituentManager2\node_modules\@angular\compiler-cli\src\ngtools_api.js:44:36)
at AngularCompilerPlugin._getLazyRoutesFromNgtools (C:\Users\Gary\WebstormProjects\ConstituentManager2\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:246:66)
at Promise.resolve.then.then (C:\Users\Gary\WebstormProjects\ConstituentManager2\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:542:50)
at
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: ng build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! C:\Users\Gary\AppData\Roaming\npm-cache_logs\2017-11-02T23_01_15_401Z-debug.log

Desired functionality.

Mention any other details that might be useful.

The same application works with Angular 4.4.6 and Angular-cli 1..4.5.

repro steps 1 (urgent) broken

Most helpful comment

I have the same issue

All 18 comments

I have the same issue

I have the same issue

Same here...

in my case uninstall ngx-restangular Solve the problem

This doesn't seem to happen by just making a new project and trying to build. Does someone have a project that I can look at where this happens?

@filipesilva Hi, I have a project for you to see this issue.
https://github.com/Ks89/angular-modal-gallery/tree/develop/demo/angular-cli

This repo is a personal library, but the full path above is my demo built with angular-cli to test my library. So, you are free to build it by yourself.
Running ng serve or npm start, you'll get the error 'staticSymbol.assertNoMembers is not a function'.

I'm using a library "npm i --save angular-modal-gallery@beta" built with ng-packagr to support Angular 5 and Angular package format v4 specification, but angular-cli throws this error.

The same error appears also using the previous version (3.3.5) of my library (npm i --save angular-modal-gallery@latest) without Angular package format v4 specifications, but built by myself using rollup that wasn't working with Angular 5 (issue).

PS: my ng --version is

Angular CLI: 1.5.0
Node: 8.5.0
OS: darwin x64
Angular: 5.0.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.5.0
@angular-devkit/build-optimizer: 0.0.32
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.35
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0
@schematics/angular: 0.1.0
typescript: 2.4.2
webpack: 3.8.1

My project is not large but uses a number of different npm modules. All compiles and works in Angular 4.4.6 using CLI 1.4.5. I attached my package.json for your review if that helps.

I would like to understand what triggers this type of error. If I know somewhere to look that would be great. I have run lint and no errors.

Would you suggest just start removing modules until it complies?

package.zip

@ghaddon why did you close this issue?

@ghaddon, If you close an issue could you please provide either an explanation or a fix?
Thanks!

I fixed this issue removing "devDependencies" and "dependencies" from package.json of my library inside node_modules/mylib/package.json of the angular-cli project.

So the problem was the library not angular-cli itself, but this strange behaviour happened only with angular 5 and angular-cli 1.5.
With angular-cli 1.4 and angular 4 it was working, but not now. I don't know why.

This is really dangerous for all open source libraries with devDependencies and dependencies specified in their package.json.

I am so sorry for closing without the cause. I believe I hit the wrong key when looking at the issue log earlier.

What I did was start fresh and started installation one module at a time. The last module I tested was the one caused my problem. The module was angular2-focus which I used for setting focus on my forms.

I have know idea what causes the build too through the error it did. However, removing the module made everything work. I know have my application running once again under Angular 5.0

This happened to me because of the ngx-clipboard package.

I guess it's too much to hope for to get the following kind of message:

There is something wrong with the ngx-clipboard package, which is preventing building. Please contact the developer and encourage him to ensure compatibility with Angular 5.x/angular-cli 1.5.

Hi guys,

I upgraded from Angular 4.4.5 to 5.0.0 version. However, I got the same issue.

Here is my setup:
npm 5.4.2
angular/cli: 1.5.0
ng2-breadcrumb: 0.5.14 <-- coming from this dependency.

Here is the error message:

ERROR in TypeError: staticSymbol.assertNoMembers is not a function
    at AotSummaryResolver.resolveSummary (angular5-app/node_modules/@angular/compiler/bundles/compiler.umd.js:31928:22)
    at CompileMetadataResolver._loadSummary (angular5-app/node_modules/@angular/compiler/bundles/compiler.umd.js:14709:66)
    at CompileMetadataResolver.isDirective (angular5-app/node_modules/@angular/compiler/bundles/compiler.umd.js:15003:23)
    at CompileMetadataResolver._getTypeDescriptor (angular5-app/node_modules/@angular/compiler/bundles/compiler.umd.js:15269:18)
    at angular5-app/node_modules/@angular/compiler/bundles/compiler.umd.js:15131:78
    at Array.forEach (<anonymous>)
    at CompileMetadataResolver.getNgModuleMetadata (angular5-app/node_modules/@angular/compiler/bundles/compiler.umd.js:15114:49)
    at visitLazyRoute (angular5-app/node_modules/@angular/compiler/bundles/compiler.umd.js:29937:104)
    at AotCompiler.listLazyRoutes (angular5-app/node_modules/@angular/compiler/bundles/compiler.umd.js:29905:20)
    at AngularCompilerProgram.listLazyRoutes (angular5-app/node_modules/@angular/compiler-cli/src/transformers/program.js:157:30)
    at Function.NgTools_InternalApi_NG_2.listLazyRoutes (angular5-app/node_modules/@angular/compiler-cli/src/ngtools_api.js:44:36)
    at AngularCompilerPlugin._getLazyRoutesFromNgtools (angular5-app/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:246:66)
    at Promise.resolve.then.then (angular5-app/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.

Any idea how to proceed to solve this kind of issue?

Thanks in advance for your help!

For me, I found that one of my additional Angular Components "@Angular2-focus" cause the problem.
What I would suggest is go to your app-module.ts file and start to comment out modules and just try NG BUILD.
Again just something that worked for me.
On Monday, November 6, 2017, 7:26:16 AM MST, aissamJ notifications@github.com wrote:

Hi guys,

I upgraded from Angular 4.4.5 to 5.0.0 version. However, I got the same issue.

Here is my setup:
npm 5.4.2
angular/cli: 1.5.0
ng2-breadcrumb: 0.5.14 <-- coming from this dependency.

Here is the error message:
ERROR in TypeError: staticSymbol.assertNoMembers is not a function
at AotSummaryResolver.resolveSummary (angular5-app/node_modules/@angular/compiler/bundles/compiler.umd.js:31928:22)
at CompileMetadataResolver._loadSummary (angular5-app/node_modules/@angular/compiler/bundles/compiler.umd.js:14709:66)
at CompileMetadataResolver.isDirective (angular5-app/node_modules/@angular/compiler/bundles/compiler.umd.js:15003:23)
at CompileMetadataResolver._getTypeDescriptor (angular5-app/node_modules/@angular/compiler/bundles/compiler.umd.js:15269:18)
at angular5-app/node_modules/@angular/compiler/bundles/compiler.umd.js:15131:78
at Array.forEach ()
at CompileMetadataResolver.getNgModuleMetadata (angular5-app/node_modules/@angular/compiler/bundles/compiler.umd.js:15114:49)
at visitLazyRoute (angular5-app/node_modules/@angular/compiler/bundles/compiler.umd.js:29937:104)
at AotCompiler.listLazyRoutes (angular5-app/node_modules/@angular/compiler/bundles/compiler.umd.js:29905:20)
at AngularCompilerProgram.listLazyRoutes (angular5-app/node_modules/@angular/compiler-cli/src/transformers/program.js:157:30)
at Function.NgTools_InternalApi_NG_2.listLazyRoutes (angular5-app/node_modules/@angular/compiler-cli/src/ngtools_api.js:44:36)
at AngularCompilerPlugin._getLazyRoutesFromNgtools (angular5-app/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:246:66)
at Promise.resolve.then.then (angular5-app/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:542:50)
at
at process._tickCallback (internal/process/next_tick.js:188:7)

webpack: Failed to compile.

Any idea how to proceed to solve this kind of issue?

Thanks in advance for your help!

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

I have the same issue

Angular CLI: 1.5.0
Node: 7.10.1
OS: win32 x64
Angular: 5.0.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.5.0
@angular/tsc-wrapped: 0.4.2
@angular-devkit/build-optimizer: 0.0.32
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.35
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0
@schematics/angular: 0.1.0
typescript: 2.6.1
webpack-bundle-analyzer: 2.9.0
webpack: 3.8.1

ERROR in TypeError: staticSymbol.assertNoMembers is not a function
at AotSummaryResolver.resolveSummary (D:\SISTEMAS\SOFTCLASS\softclass-admin\node_modules\@angular\compiler\bundles\compiler.umd.js:31928:22)
at CompileMetadataResolver._loadSummary (D:\SISTEMAS\SOFTCLASS\softclass-admin\node_modules\@angular\compiler\bundles\compiler.umd.js:14709:66)
at CompileMetadataResolver.isDirective (D:\SISTEMAS\SOFTCLASS\softclass-admin\node_modules\@angular\compiler\bundles\compiler.umd.js:15003:23)
at CompileMetadataResolver._getTypeDescriptor (D:\SISTEMAS\SOFTCLASS\softclass-admin\node_modules\@angular\compiler\bundles\compiler.umd.js:15269:18)
at D:\SISTEMAS\SOFTCLASS\softclass-admin\node_modules\@angular\compiler\bundles\compiler.umd.js:15131:78
at Array.forEach (native)
at CompileMetadataResolver.getNgModuleMetadata (D:\SISTEMAS\SOFTCLASS\softclass-admin\node_modules\@angular\compiler\bundles\compiler.umd.js:15114:49)
at CompileMetadataResolver.getNgModuleSummary (D:\SISTEMAS\SOFTCLASS\softclass-admin\node_modules\@angular\compiler\bundles\compiler.umd.js:15041:52)
at D:\SISTEMAS\SOFTCLASS\softclass-admin\node_modules\@angular\compiler\bundles\compiler.umd.js:15129:72
at Array.forEach (native)
at CompileMetadataResolver.getNgModuleMetadata (D:\SISTEMAS\SOFTCLASS\softclass-admin\node_modules\@angular\compiler\bundles\compiler.umd.js:15114:49)
at visitLazyRoute (D:\SISTEMAS\SOFTCLASS\softclass-admin\node_modules\@angular\compiler\bundles\compiler.umd.js:29937:104)
at AotCompiler.listLazyRoutes (D:\SISTEMAS\SOFTCLASS\softclass-admin\node_modules\@angular\compiler\bundles\compiler.umd.js:29905:20)
at AngularCompilerProgram.listLazyRoutes (D:\SISTEMAS\SOFTCLASS\softclass-admin\node_modules\@angular\compiler-cli\src\transformers\program.js:157:30)
at Function.NgTools_InternalApi_NG_2.listLazyRoutes (D:\SISTEMAS\SOFTCLASS\softclass-admin\node_modules\@angular\compiler-cli\src\ngtools_api.js:44:36)
at AngularCompilerPlugin._getLazyRoutesFromNgtools (D:\SISTEMAS\SOFTCLASS\softclass-admin\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:246:66)
at Promise.resolve.then.then (D:\SISTEMAS\SOFTCLASS\softclass-admin\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:542:50)
at process._tickCallback (internal/process/next_tick.js:109:7)

I got the same issue,please answer

As this topic is quite old, it might very well be fixed by upgrading the packages:

Upgrade packages

Clean up

  • Remove node_modules from your project.

Reinstall

  • Run npm install to install the latest dependencies.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

delasteve picture delasteve  Â·  3Comments

brtnshrdr picture brtnshrdr  Â·  3Comments

MateenKadwaikar picture MateenKadwaikar  Â·  3Comments

NCC1701M picture NCC1701M  Â·  3Comments

jmurphzyo picture jmurphzyo  Â·  3Comments