doe
doe

Reputation: 455

Can't find file on stackblitz Angular project

I generated service in my 'services' directory and import it. I'm getting this error:

Import error, can't find file:
./services/timer-service.service

app.component.ts

import { TimerService } from  './services/timer.service';

https://stackblitz.com/edit/angular-subject-queue

Upvotes: 2

Views: 4395

Answers (1)

Hardik Patel
Hardik Patel

Reputation: 3949

There is no service exist on path './services/timer-service.service'. You must have rename service file name to './services/timer.service'

You need to remove old reference from app.module.

Below line to be removed and providers list will be updated accordingly.

import { TimerServiceService } from './services/timer-service.service';

Upvotes: 3

Related Questions