☠️ Bug: Dynamic imports are broken ☠️

Dynamic imports of the form

Foo = (await import('https://unpkg.com/foo?module')).default
// or
foo = import("foo")

throw the error

TypeError: i[o] is not a function

Examples:

1 Like

Yep. The workaround I have to use currently is replacing all dynamic imports with require('https://bundle.run/...')

Sorry, this was my fault! I’ve deployed a fix.

1 Like

Out of curiousity: How did this one sneak past your tests?

The tests passed because our parser was using a newer version of acorn-walk than the server, and a code change relied on a feature that was added in a recent minor of acorn-walk.

2 Likes

Have you considered adding some integration tests? E.g. pick a number of test notebooks and ensure that these render without errors?

Yes, we have integration tests as well, but not ones that covered this specific case.