Issue with codesandbox and Org-scoped packages

If I clone the TypeScript example from https://aurelia.io/blog/2018/11/04/aurelia-2018-q3-report and then add a dependency to @dunite/au-office-ui the project stops to load properly. I assume it has something to do with the logic in codesandbox.ts file that loads modules and the fact that the module name includes a front-slash. My string-manipulation-fu did not manage to correct the issue. The more brute force attempt did work however so it works for me now. I added below lines in codesandbox.ts, just above if (moduleName.includes("/"))

try {
    return await import('../node_modules/@dunite/au-office-ui');
} catch (e) {
console.log(e);
}

The working example can be found here: https://codesandbox.io/s/71777k4l41

Is there an easy and proper fix to codesandbox.ts?

1 Like

I noticed this too. Probably we will need to ask the codesandbox team to give us some hint where to handle this issue. In my earlier attempt trying to fix this, I noticed sometimes dependencies are outdated (not what specified in the bottom left panel list)