iOS Build: Cannot read property 'assertNoMembers' of undefined


#1

When ionic cordova build ios --prod running a fairly vanilla app I get:

TypeError: Cannot read property ‘assertNoMembers’ of undefined
at AotSummaryResolver.resolveSummary (/Users/michael/workspace/bonaca/node_modules/@angular/compiler/bundles/compiler.umd.js:31986:21)
at CompileMetadataResolver._loadSummary (/Users/michael/workspace/bonaca/node_modules/@angular/compiler/bundles/compiler.umd.js:14710:66)
at CompileMetadataResolver._getEntryComponentMetadata (/Users/michael/workspace/bonaca/node_modules/@angular/compiler/bundles/compiler.umd.js:15742:66)
at /Users/michael/workspace/bonaca/node_modules/@angular/compiler/bundles/compiler.umd.js:15208:72
at Array.map (native)
at CompileMetadataResolver.getNgModuleMetadata (/Users/michael/workspace/bonaca/node_modules/@angular/compiler/bundles/compiler.umd.js:15208:18)
at /Users/michael/workspace/bonaca/node_modules/@angular/compiler/bundles/compiler.umd.js:30144:70
at Array.forEach (native)
at analyzeFile (/Users/michael/workspace/bonaca/node_modules/@angular/compiler/bundles/compiler.umd.js:30127:53)
at AotCompiler._analyzeFile (/Users/michael/workspace/bonaca/node_modules/@angular/compiler/bundles/compiler.umd.js:29328:17)
[22:47:40] copy finished in 3.27 s

Has anyone seen this?


#2

Yes, I also have a similar issue:

TypeError: Cannot read property 'assertNoMembers' of null
    at AotSummaryResolver.resolveSummary (/dir/node_modules/@angular/compiler/bundles/compiler.umd.js:31986:21)
    at CompileMetadataResolver._loadSummary (/dir/node_modules/@angular/compiler/bundles/compiler.umd.js:14710:66)
    at CompileMetadataResolver._getEntryComponentMetadata (/dir/node_modules/@angular/compiler/bundles/compiler.umd.js:15742:66)
    at /dir/@angular/compiler/bundles/compiler.umd.js:14904:76
    at Array.map (native)
    at CompileMetadataResolver.getNonNormalizedDirectiveMetadata (/dir/node_modules/@angular/compiler/bundles/compiler.umd.js:14904:22)
    at /dir/node_modules/@angular/compiler/bundles/compiler.umd.js:29359:88
    at Array.forEach (native)
    at AotCompiler.findGeneratedFileNames (dir/node_modules/@angular/compiler/bundles/compiler.umd.js:29358:25)
    at Object.findGeneratedFileNames (/dir/node_modules/@angular/compiler-cli/src/transformers/program.js:392:82)

#3

I realized the error was caused by having classes in the list of Providers that I was no longer importing.