You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running web-ext results in an error due to not being able to find git-rev-sync. This is due to a branch that only runs when web-ext is built with NODE_ENV=development. This bug was introduced in #250477 with the switch away from the npm registry. A simple fix exports NODE_ENV=production as part of the preBuild hook.
Here is the relevant line from the program.js in the nix store:
$web-ext--help
node:internal/errors:496ErrorCaptureStackTrace(err);^Error[ERR_MODULE_NOT_FOUND]: Cannotfindpackage 'git-rev-sync' imported from /nix/store/pzqvm774id8cj7nslvpbd4lwywapmpbn-web-ext-7.6.2/lib/node_modules/web-ext/lib/program.js at new NodeError (node:internal/errors:405:5) at packageResolve (node:internal/modules/esm/resolve:887:9) at moduleResolve (node:internal/modules/esm/resolve:936:20) at defaultResolve (node:internal/modules/esm/resolve:1129:11) at nextResolve (node:internal/modules/esm/loader:163:28) at ESMLoader.resolve (node:internal/modules/esm/loader:835:30) at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18) at ESMLoader.import (node:internal/modules/esm/loader:524:22) at importModuleDynamically (node:internal/modules/esm/translators:110:35) at importModuleDynamicallyCallback (node:internal/process/esm_loader:35:14) { code: 'ERR_MODULE_NOT_FOUND'
}
[kirillvr@osaka:~/nixpkgs]$ nix-build -A web-ext
/nix/store/v8brnsmhzcgiwxslzhmrkvyk9r42c6gm-web-ext-7.9.0
[kirillvr@osaka:~/nixpkgs]$ ./result/bin/web-ext --help
Usage: web-ext.js [options] command
Option values can also be set by declaring an environment variable prefixed
with $WEB_EXT_. For example: $WEB_EXT_SOURCE_DIR=/path is the same as
--source-dir=/path.
Describe the bug
Running web-ext results in an error due to not being able to find
git-rev-sync
. This is due to a branch that only runs when web-ext is built withNODE_ENV=development
. This bug was introduced in #250477 with the switch away from the npm registry. A simple fix exportsNODE_ENV=production
as part of thepreBuild
hook.Here is the relevant line from the
program.js
in the nix store:Here is the same line from the npm registry (used by the old nix package):
Steps To Reproduce
Reproduce by running any web-ext command:
Expected behavior
Output of fixed web-ext:
The text was updated successfully, but these errors were encountered: