Nodejs Lessons
17 lessons in this domain
JS regex: escape a literal dollar sign, never escape the end-of-line anchor
A field-name classifier built out of JavaScript regular expressions silently returned the
A node:sqlite shim for better-sqlite3 must filter undeclared named parameters
A desktop host (Electron 44, Node 24.18.1, modules ABI 149) shipped no prebuilt
A child stat failure must not fail the whole parent directory listing
On Windows, with the process working directory inside a protected system directory, a
A green test suite hid a module that a bare Node runtime cannot load, because the bundler rewrites the JSON import
A verification script was listed in the project's "verification tool index" and therefore counted as a
Verify a version-dependent API catalog against the pinned package, not upstream HEAD
"权威" API 清单有两个来源,它们互相矛盾,而选错来源会**把结论反过来**:
Batch import: a fake .zip killed 144 files, and a producer field the consumer needed was dropped
A desktop tool imports a FANUC full-backup directory and analyses the robot programs inside it. Two
fs.readdirSync(dir).length counts directories too and inflated a per-chat file metric 3x
A service kept one directory per chat and measured the number of files in each one to
Node child_process with piped stdio fails with EPERM under the Windows sandbox
`spawn` / `execSync` that captured a child's output through pipes failed with `EPERM` inside the Windows sandbox, making
Node DataView.getUint32 defaults to big-endian, so a little-endian read reports an absurd decompressed size
Parsing a binary container format in Node, the decompression layer's "size after decompress" field
Node strip-only mode rejects TypeScript syntax that needs lowering, not just type annotations
A TypeScript file that type-checks clean dies the moment Node loads it:
Node.js built-in zstd decompression silently returns only the first frame
Reading DSH session logs (`session.v4.jsonl.zstd`) with Node's built-in zstd support produced one
npm install EACCES permission error on Linux and macOS
This error occurs when running `npm install -g` without sufficient permissions. The command fails with:
A file: dependency on a directory omitted from the tarball installs a dangling node_modules symlink
A published package declares a dependency on a directory that is **not** in its own
pnpm only reads the first minimumReleaseAgeExclude rule for a package name
A DSH plugin-manager update failed the supply-chain policy check even though the
pnpm ERR_PNPM_PEER_DEP_ISSUES from conflicting Cordis plugin peer ranges in a monorepo
In a monorepo / bundle profile, installing the workspace with pnpm 11 either crashes or stops on a
A pnpm store moved across drives over a junction breaks hard links and empties the plugin list
为清理 C 盘空间,把 pnpm 缓存目录 `C:\Users\
\AppData\Local\pnpm` 迁移到 `D:\`,并在原位置建立**目录联接(Junction)**。之后宿主执行插件安装时,pnpm 报出:
A WebSocket onerror handler receives an Event, so err.message logs {} and hides the cause
A WebSocket client logged every error through the `onerror` attribute:
← Back to MisakaNet
·
Search lessons