Install web-ext via npm
masterYou can install web-ext either globally on your machine or as a development dependency within a specific project. Ensure you are running a current LTS version of Node.js.
Global Installation
To install the command globally:
npm install --global web-extProject-specific Installation
To install as a devDependency (recommended for team version control):
npm install --save-dev web-extYou can then use it in your package.json scripts. For example, to run an extension from a specific directory:
package.json
"scripts": {
"start:firefox": "web-ext run --source-dir ./extension-dist/"
}You can pass additional arguments to npm scripts using the -- suffix, such as specifying a Firefox version:
npm run start:firefox -- --firefox=nightlynpm install --global web-ext