Discussions

Ask a Question
Back to All

code: 'ERR_UNKNOWN_BUILTIN_MODULE (node.js)

Error [ERR_UNKNOWN_BUILTIN_MODULE]: No such built-in module: node:stream;
at new NodeError (node:internal/errors:405:5)
at ESMLoader.builtinStrategy (node:internal/modules/esm/translators:259:11)
at ESMLoader.moduleProvider (node:internal/modules/esm/loader:468:14) {
code: 'ERR_UNKNOWN_BUILTIN_MODULE'
}


I am getting this error when try to run "npm run dev" command

i am suspecting it coming from importing of PassThrough represented below


'use strict';

import fp from "fastify-plugin";
import { PassThrough } from "node:stream;"