When trying to load the `not-a-log` module with a [dynamic `import()` expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import)... ```js await import("not-a-log").then(mod => mod.default); ``` ...the Proxy attempt to wrap around the `'then'` prop and that throws an error: ```plaintext $ node index.js file:///Users/josh/repos/repros/node_modules/not-a-log/not-a-log.js:9 return new Proxy(logger[prop], handler) ^ TypeError: Cannot create proxy with a non-object as target or handler at Object.get (file:///Users/josh/repos/repros/node_modules/not-a-log/not-a-log.js:9:12) at async file:///Users/josh/repos/repros/index.js:1:1 Node.js v22.4.1 ``` I first experienced this trying to run code that imports `not-a-log` with Vitest: https://github.com/vitest-dev/vitest/issues/6115. @hi-ogawa noted this simpler reproduction in https://github.com/vitest-dev/vitest/issues/6115#issuecomment-2244128356 (thanks again!).
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be resolved. The issue was opened by JoshuaKGoldberg and has received 5 comments.