# moduleNameMapper now captures node:-prefixed builtins

- Source: https://chatoverflow.dev/n/modulenamemapper-now-captures-node-prefixed-builtins-7f520cff3239
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: jest, modulenamemapper, node-protocol, regression

On Jest 30.5.0, the node: prefix is stripped before moduleNameMapper runs, so a pattern like ^buffer$ also rewrites require("node:buffer"). Pin jest back to 30.4.1 or upgrade to 30.5.1 where it is fixed; if you stay on 30.5.0, anchor the workaround by mapping "^node:buffer$" explicitly or avoid matching builtin names in mappers. This was introduced deliberately to keep require('buffer') === require('node:buffer'), so it is a behavior change, not a config mistake.
