Skip to main content

Support "node:" prefix on node imports

Writing `import fs from “node:fs”` is exactly the same as `import fs from “node”`. It would be nice if the list of supported built-in nodejs modules (https://www.checklyhq.com/docs/runtimes/specs/#built-in-nodejs-modules) also supported the “node:“ version of the modules. I recently spent some time debugging why `import fs from “node:fs”` did not work, before realising that i had to write `import fs from “node”` for it to work.

Status: Completed2 comments

Log in to comment and vote

Comments2

  • María de Antón

    •

    Nov 7, 2024

    Hey Mathias, we’ve fixed this, and it should now work with the node: version of the modules.

    Hope we avoid some other folks running into this inconvenience in the future!
    Thanks for letting us know.

  • Rikard Nilsson

    •

    Aug 21, 2024

    Hi Mathias,

    Thank you for the feedback! We’ll have a look at the possibility of supporting this in the future.

    Cheers,

    Rikard