Ng2 webcam integration in angular4 angular-cli app Failed to compile
I have created a completely new Angular4 app using angular-cli. After that, I integrated ng2-webcam using npm install. Now if I add this ng2-webcam dependency to app.module.ts
import { WebCamComponent } from 'ng2-webcam';
...
@NgModule({
declarations: [
AppComponent,
WebCamComponent
],
....
})
export class AppModule { }
In ng serve
it cannot compile and gives the following error:
Failed to compile.
./~/ng2-webcam/lib/fallback/jscam.swf
Module parse failed: f:\projects\edu\hops\webcam\node_modules\ng2-webcam\lib\fallback\jscam.swf Unexpected character '' (1:3)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./~/ng2-webcam/index.ts 4:0-34
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts
Would it be nice if someone can tell me how to solve this? How do I enable the bootloader?
+3
source to share
No one has answered this question yet
Check out similar questions: