- CommonJS modules
- ECMAScript modules
- Authors can tell Node.js to use the ECMAScript modules loader via the .mjs file extension, the package.json "type" field, or the --input-type flag. Outside of those cases, Node.js will use the CommonJS module loader. See Determining module system for more details.
- Initialize package.json with
npm init. - Install packages
npm install [package]