Need to sign an Add-On with the second-newest web-ext

I just tried to sign a new version of my AddOn (still experimental, so not publicly viewable), and it failed with the message:

Update available 7.8.0 → 7.9.0
Run npm i -g web-ext to update

However, this is not that easy in my case. I’m a Linux user, and I’ve installed web-ext via my package manager. So I can’t just update web-ext directly without creating conflicts on next package update.
Although Arch Linux usually is fast in providing updates, we’re approaching holiday season and the package maintainer might be on vacation.
So I need away to use the existing web-ext, and honestly I don’t understand why there isn’t some grace time in general.

Any ideas?
Thanks.

But the web-ext is a NPM library, so the NPM is the package manager in this case.

The issue you may face is the “-g” option which makes the installation global and that has some potential issues.
I’m not 100% sure but I think you need to run this with sudo and it may not work at all if your NPM is installed through Snap.
At least these two issues I remember facing few years back when I experimented with extension development in Ubuntu.

Thanks for your reply. I’ve used pacman, the package manager of my Linux distro because it is the simplest way to get updates quickly and to make it available system-wide.

Yes, would need to run it with sudo. But it would overwrite files that are recorded in pacman’s database and this way causing conflicts.

I’m using npm as package manager for project-specific node packages. But not for system-wide tools.
Requiring that is just ignoring the Linux way.

@Markus-N, where are you seeing that message? AFAIK that should be an advisory warning, not a hard error. If it’s being returned by AMO’s APIs, that’s even more unexpected.

Depending on how you’re using web-ext, it may be possible to work around this. For example, rather than install web-ext globally you could install it as a dev-dependency of your project. Once installed in the project, you can invoke it either directly from the node_modules directory or by creating a script for it in your package.json.

Add web-ext as a dev dependency

$ npm install --save-dev web-ext

Approach 1: Running directly form node_modules

$ node node_modules/web-ext/bin/web-ext.js --version
7.9.0

Approach 2: Running with a package script

Step 1: Add the script to your package.JSON

{
  "name": "demo",
  "version": "1.0",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "web-ext": "web-ext" // <-- new script
  },
  "devDependencies": {
    "web-ext": "^7.9.0"
  }
}

Step 2: Use “npm run” to invoke the local version of web-ex

$ npm run web-ext -- --version

> demo@1.0 webext
> web-ext --version

7.9.0

1 Like