Cornerstone3D initialization

Hi, I’m trying to use cornerstone 3D to render some Dicom files but I just cannot get rid of this error - @cornerstonejs/core is not initialized, run init() first. This is my import code -

import * as cornerstone3D from ‘@cornerstonejs/core’;
cornerstone3D.init();

I’m definitely missing something but I’ve been through the documentation and examples and I cannot find any reference to how cornerstone3D actually needs to be initialized.

Any help is appreciated.

you should await init