What is included
Each Node.js version in Bearsampp bundles:- The
nodeexecutable npm(Node Package Manager)- An
npmrcconfiguration file for npm settings
Opening the Node.js console
The fastest way to run Node.js commands in Bearsampp is through the built-in console, which launches a command prompt with Node.js and npm already on thePATH:
Switching Node.js versions
Bearsampp supports multiple Node.js versions. To switch:Switching the Node.js version does not affect any already-open console windows. Close and reopen the console after switching to pick up the new version.
npm configuration
npm reads its configuration from thenpmrc file bundled with each Node.js version:
.npmrc file in your project root, or a user-level one at ~/.npmrc. npm merges settings from all three locations.
Running Node.js scripts
You can run any Node.js script from the console or integrate Node.js into your project workflow:package.json, run npm install first to install dependencies, then use whichever npm run scripts your project defines.
Common use cases
Install a package globally
Open the Node.js console and run
npm install -g package-name.Run a build tool
Navigate to your project folder and run
npm run build or npx webpack.Start a dev server
Run
npm run dev or node server.js to start a local Node.js HTTP server.Manage dependencies
Use
npm install, npm update, and npm uninstall to manage your project’s node_modules.Module details
| Property | Value |
|---|---|
| Type | Tool (not a Windows service) |
| npm | Bundled with each Node.js version |
| Config file | bin/nodejs/nodejsX.X.X/etc/npmrc |
| Version switch | Tray → Node.js → Versions |
| Console access | Tray → Node.js → Console |
