Reputation: 3
do you have any idea why import is not working in Angular?
ERROR:
Error: src/app/customers/customers.component.ts:4:22 - error TS7016: Could not find a declaration file for module 'jsmpeg-player'. 'C:/Users/adabi/OneDrive/Bureau/Angular/Aximum/angular11/node_modules/jsmpeg-player/build/jsmpeg-player.js' implicitly has an 'any' type.
Try npm i --save-dev @types/jsmpeg-player
if it exists or add a new declaration (.d.ts) file containing declare module 'jsmpeg-player';
4 import {jsmpeg} from 'jsmpeg-player';
Upvotes: 0
Views: 1796
Reputation: 73
Try using
import JSMpeg from 'jsmpeg-player';
or
declare var 'jsmpeg-player';
I think this npm has been deprecated please use the latest one if not its fine working on it.
Upvotes: 0