Untitled Lesson
Skill Matrix
UNLOCK NODES BY LEARNING NEW TAGS.
Which of these built-in Node.js modules is ONLY accessible via the `node:` prefix, with no legacy bare-specifier alias available at all?
💻 Code Challenge | +75 XP
Refactor a file's imports (fs, path, http, crypto) to use the explicit node: prefix, and add the unicorn/prefer-node-protocol ESLint rule to enforce it going forward.
A teammate opens a PR where some files use "fs" and others use "node:fs" inconsistently. Reorder the steps to standardize the whole codebase.
Task: Reorder the blocks in logical sequence to solve the problem.
A.D.A. Interface
Adaptive Didactic Assistant

Pascual Vila
Frontend Instructor // Code Syllabus
The Error //
Assuming every Node built-in module has a legacy bare-specifier alias
// Wrong — throws, no bare alias exists
import { test } from "test";
// Correct — the only valid form
import { test } from "node:test";The Solution //
Modules introduced after the node: convention was established — like node:test and node:sqlite — are only accessible via the prefixed form and have no bare "test" or "sqlite" alias at all. Attempting a bare import for these throws a module-not-found error, not a warning.
The Error //
Inconsistently mixing prefixed and bare imports across a codebase with no linting enforcement
// .eslintrc — enforces the convention automatically
{ "rules": { "unicorn/prefer-node-protocol": "error" } }The Solution //
Without a lint rule enforcing one convention, a codebase drifts into a mix of "fs" and "node:fs" imports depending on which developer or era wrote each file — harmless functionally, but it undermines the readability benefit of being able to instantly distinguish core imports from third-party ones at a glance.