- Installation Options. Mountebank knows first-hand how frustrating it is to be working in.NET and have to fiddle with a JDK just to get a testing library working, and the hassle of setting up ruby in your build pipeline to compile CSS even though you're on a Java project.
- Nvm install 12.18.3 // update node version through node version manager npm install npm // update your npm version to latest Delete your nodemodules folder and package-lock.json file. Force clean the entire NPM cache by using following comand. Npm cache clean -force Re-Install all the dependencies.
mountebank knows first-hand how frustrating it is to be working in .NET and have tofiddle with a JDK just to get a testing library working, and the hassle of setting upruby in your build pipeline to compile CSS even though you're on a Java project. mountebankwants you to be happy, and therefore he supports the following hassle-free installation options,which he assures you just work.
Using a Node version manager to install Node.js and npm. Node version managers allow you to install and switch between multiple versions of Node.js and npm on your system so you can test your applications on multiple versions of npm to ensure they work for users on different versions. OSX or Linux Node version managers. Nvm; n; Windows Node.
Option | node.js required? | sudo required? | links | Description |
---|---|---|---|---|
Docker image | No | No | Docker hub | Can run with a command like docker run --rm -p 2525:2525 -p 8080:8080 mountebank:2.4.0 mb start --configfile imposters.ejs |
Self-contained archives | No | No | Simply unpack and run mb from inside. See below for Windows constraints. | |
OS-specific packages | No | Yes | Puts mb at /usr/local/bin , which is generally in the PATH . | |
source tarball | Yes | No | source tarball if you roll that way. |
Running as a system daemon
You can also configure mountebank to run as a unix system daemon. A sample ansible playbook and systemd configuration file isavailable here (Tested on RHEL7 and Centos7).
Windows path limitations
*mountebank wishes very much for your Windows experience to be hassle-free, but he is simply not qualified to address a particular constraint of Windows Explorer. For legacy reasons, some Windows applications, including most notably Windows Explorer, have a maximum number of characters allowed in a path of 260 characters. As mountebank writes these words, the longest path he includes in the zip files is around 175 characters. The zip file name, which is likely to represent itself as two nested directories if you use the defaults to unzip it, will be around 25 characters. That gives you very little wiggle room. If you unzip the file in your users directory, you may very likely get an error because of this constraint.
The following solutions will all work:
- Unzip to the root of your C: drive (or a similar small path)
- Use 7zip to unzip the file instead of Windows Explorer
- Use
npm
to install mountebank instead of the zip file
If you’re looking for an easy guide to install Node.js and npm on OS X and macOS — this is it.
Before we get started, are you listening to JS Party? If not, you should be! Maybe start with our episode all about best practices for Node developers. ✊
The default method for installing Node.js is to download a pre-built installer for your platform, install it and make sure it’s on your $PATH
.
However, if you’re a Homebrew fan like me and prefer to install all of your packages with it — ensuring your packages are installed using the same commands and directories and allowing Homebrew to easily manage upgrades and updates — then this guide will help you get started.
Install Node.js and npm with Homebrew
First, install Homebrew.
Then run brew update
to make sure Homebrew is up to date.
As a safe measure you should run brew doctor
to make sure your system is ready to brew. Run the command below and follow any recommendations from brew doctor.
Next, add Homebrew’s location to your $PATH
in your .bash_profile
or .zshrc
file.
Next, install Node (npm will be installed with Node):
To test out your Node and npm install, try installing Grunt (you might be asked to run with sudo):

If that worked then congratulations — you’ve installed Node.js, npm, and Grunt.
Install Npm On Osx Laptop
If not — retrace your steps or post a question to Stack Overflow.
Listen to related podcasts on The Changelog
Install Npm On Mac M1
Since you’re interested in Node.js, npm, and Homebrew — listen to some recent related podcasts we’ve done on those subjects.
