Unverified50% confidenceCautionExact time
After customizing the npm prefix, you must explicitly set NODE_PATH to point to NodeGlobal\node_modules, otherwise referencing global modules in code will report Cannot find module.
1
Sources
50%
Confidence
Long-term
Relevance
10/23/2026
First Seen
Sources
Related Entities
Related Claims
UnverifiedA global npm install (`-g`) downloads the package to the global node_modules directory and creates an executable entry in Node's bin directory, which is in PATH by default; terminals that are already open will not pick up PATH changes, so the terminal needs to be reopened.76% similarUnverifiedNODE_PATH is a Node.js-specific module search path variable used to tell the runtime which directories to look in for globally installed modules.74% similarVerifiedChecking "Add to PATH" during Node.js installation automatically adds the installation path to the system environment variable PATH, allowing the system to recognize the node and npm commands from any location.72% similarUnverifiednpm i is an abbreviation for npm install, which reads package.json and downloads dependencies into the node_modules directory.69% similarVerifiedConfiguring system environment variables requires creating a new NODE_PATH variable pointing to the node_modules directory under the global directory, and adding the global directory path and %NODE_PATH% to the Path variable.67% similar
Cite This Claim
Stable URI
https://kongchang.com/claim/1089015API
curl https://kongchang.com/api/v1/knowledge/claims/1089015MCP
get_claim(id=1089015)