I'm trying to load a static resource file in lightning web component which is running under vlocity_ins runtime. I'm getting the error Scoped imports are not allowed when runtime namespace is specified

import OmniscriptSelect from 'vlocity_ins/omniscriptSelect';
import template from './bhExtendedOmniscriptSelect.html';
import { loadStyle } from 'lightning/platformResourceLoader';
import newportoverride from '@salesforce/resourceUrl/newportoverride';

export default class BhExtendedOmniscriptSelect extends OmniscriptSelect {
    connectedCallback() {
        this._realtimeOptions = this._realtimeOptions.filter(item => item.label !== '-- Clear --');

            loadStyle(this, newportoverride + '/newport-override.css')
        )].then(() => {
            console.log('styles loaded');

    render() {
        return template;

Below image shows error in omniscript when previewed on LWC preview tab Image shows the error in detail

1 Answer 1


This is now supported with Lightning Web Security. Check the documentation here. It's in Open BETA as of March 2022.

Previous Answer (Outdated)

Importing LWC component or static resource from another namespace is currently not supported as of today.

The locker service prevents this today. There is work in progress to support this in the future with safe harbor

There is an idea in the below link


There is also a comment from PM on this on the below answer

Not being able to reference packaged custom LWCs from other LWCs outside the package

The alternative is to work with aura component or iframe VF page inside LWC

  • Is there a work around for this? Commented Apr 1, 2021 at 4:36
  • Try Aura component instead! Commented Apr 1, 2021 at 4:40
  • Will try this. Thanks @Mohith Commented Apr 1, 2021 at 4:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .