Cannot find module './app.component.html'
Hi everyone I am so hopeless of using meteor as I have faced lots of unforeseen problems and couldn't learn it. anyway I use socially project and it doesn't let me to use template from my html file: import { Component } from '@angular/core'; import template from './app.component.html'; //problem in here... import { Observable } from 'rxjs/Observable'; import { Parties } from '../../../both/collections/parties.collection'; import { Party } from '../../../both/models/party.model'; @Component({ selector: 'app', template }) export class AppComponent { parties: Observable<Party[]>;
constructor() { this.parties = Parties.find({}).zone(); } removeParty(party: Party): void { Parties.remove(party._id); } }
I have checked it numerously although there is not clear reason for this error: Cannot find module './app.component.html' please help me to learn it.
The code looks fine to me (assuming you have an app.component.html in the same folder). I sometimes see this sort of error when I add new modules or files. For me, restarting meteor usually fixes it (my guess is that there's something in the build process that is cached that's not being updated).
thank you @sdarnell for your response. of course that 'app.component.html' is in the same folder and resetting meteor couldn't solve this problem anymore.
I solve it, after running this package: meteor npm install --save babel-runtime