This repository was archived by the owner on May 1, 2020. It is now read-only.
This repository was archived by the owner on May 1, 2020. It is now read-only.
ngc Error: Property 'string' does not exist on type... #122
Closed
Description
Short description of the problem:
My app works fine when using ionic serve
. However, when I run a build
(e.g. ionic run android
), ngc will throw an error:
[21:56:25] ngc: Error: Error at D:/Users/User/Desktop/project/.tmp/app/app.module.ngfactory.ts:587:140: Property 'string' does not exist on type 'typeof "D:/Users/User/Desktop/project/.tmp/providers/firebase.service"'.
at check (D:\Users\User\Desktop\project\node_modules\@angular\tsc-wrapped\src\tsc.js:31:15)
at Tsc.typeCheck (D:\Users\User\Desktop\project\node_modules\@angular\tsc-wrapped\src\tsc.js:86:9)
at D:\Users\User\User\project\node_modules\@angular\tsc-wrapped\src\main.js:33:23
at process._tickCallback (internal/process/next_tick.js:103:7)
at Module.runMain (module.js:592:11)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
The constructor code in question is below:
Injectable()
export class FirebaseService extends AngularFire {
...
constructor(firebaseConfig: string, auth: AngularFireAuth, database: AngularFireDatabase) {
super(firebaseConfig, auth, database)
}
...
}
Some people on the forum have worked around this by removing all mention of string
in the constructor, but because I am extending from the AngularFire
class, I must state the super call as is.
What behavior are you expecting?
ngc should not throw an error(?)
Steps to reproduce:
- Create a class with a
string
variable in the constructor. - Include said class in
app.module.ts
- Run
$ npm run build
or$ ionic run android
or$ ionic run ios
Which @ionic/app-scripts version are you using?
0.0.30
Metadata
Metadata
Assignees
Labels
No labels