CameraKit for Web & Angular Failure to Import
Hi Everyone,
I'm using angular and express on node LTS 18.16.0. (It would help to have what verisons of what to have on the docs in case this is the issue.)
I'm following along the bootstrapping guide and ran into a few errors I can't solve. The errors seem to appear when I import camerakit, before I use any functions.
When I import camerakit into my typescript file I get a long list of errors:
Errors: https://gist.github.com/PT-Alex/e7d86c5854f233fe63b335f1be585610
TS File: https://gist.github.com/PT-Alex/30328f5f0310c97a9bedb2f9077bdb37
HTML File: https://gist.github.com/PT-Alex/70b6a9e834448bf7652c12115ea83f68
Project.json: https://gist.github.com/PT-Alex/fb444fb8458b0c1f48d091108d393743
Any help would be appreciated. Thanks.
Comments
-
@alex_doudnikov Thanks for posting on the forum! Confirming receipt and shared with the team to investigate. In the meantime, I'll open a direct message just to verify your access as I'm having trouble finding you in our system.
0 -
Hi @alex_doudnikov! Thanks for sharing your sample code. Camera Kit has no default exports. Members should be imported directly. Example:
import { bootstrapCameraKit, createUserMediaSource } from '@snap/camera-kit';
Additionally, be sure you have
"skipLibCheck": true
added tocompilerOptions
in your tsconfig.json; otherwise, you may get type errors within the library itself.2 -
The thing that got it working was that
"skipLibCheck"
in the tsconfig, thanks!2 -
@alex_doudnikov Thanks for closing the loop!
0