We are back again to unwrap yet another gift (or two?
) today, so letโs get right into it.
Today weโre announcing something that will make your lives as App developers much easier! Our GA Apps SDKs are now published to NPM ![]()
Apps SDKs on NPM:
- https://www.npmjs.com/package/@canva/error
- https://www.npmjs.com/package/@canva/design
- https://www.npmjs.com/package/@canva/asset
- https://www.npmjs.com/package/@canva/user
- https://www.npmjs.com/package/@canva/platform
How to migrate:
Weโve already done the migration on the latest version of the starter kit repo, so by making sure youโre up to date with the main branch, you should be good to go once you npm install!
Alternatively, the first time you migrate from local SDKs to ones from the NPM registry, youโll need to uninstall the local versions first
# using NPM
npm uninstall @canva/design @canva/error @canva/asset @canva/user @canva/platform
# using Yarn
yarn remove @canva/design @canva/error @canva/asset @canva/user @canva/platform
Then reinstall them to ensure theyโre fetched from the NPM registry
# using NPM
npm install @canva/design @canva/error @canva/asset @canva/user @canva/platform
# using Yarn
yarn add @canva/design @canva/error @canva/asset @canva/user @canva/platform
From here you can go ahead and delete the source code for the SDKs you just installed from /sdk.
@canva/previewis not yet on npm, and all preview APIs will still be bundled with the starter kit in /sdk/preview
As always, stay tuned for more
s