Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current version of web-ext (2.2.0) on npm doesn't work #1104

Closed
cr-nz opened this issue Oct 13, 2017 · 9 comments · Fixed by #1105
Closed

Current version of web-ext (2.2.0) on npm doesn't work #1104

cr-nz opened this issue Oct 13, 2017 · 9 comments · Fixed by #1105

Comments

@cr-nz
Copy link

cr-nz commented Oct 13, 2017

I had managed to get my web-ext automatically building my extension in a shell script with this command:

#!/usr/bin/env bash
apiKey="user:123:123"
apiSecret="d4455"
web-ext sign -v --api-key="$apiKey" --api-secret="$apiSecret"

Then after it was built it recommended to do an upgrade from v2.0.0 to v2.2.0. I did that with npm. Now it no longer works anymore. All I get is this message:

[program.js][debug] Getting version from the git revision

Not even sure why git is needed!? It should be building based on the manifest file.

Here's the output of node --version && npm --version && web-ext --version which makes even less sense:

$ node --version && npm --version && web-ext --version
v6.2.1
3.9.3
Usage: web-ext [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.

To view specific help for any given command, add the command name.
Example: web-ext --help run.


Commands:
  build  Create an extension package from source
  sign   Sign the extension so it can be installed in Firefox
  run    Run the extension
  lint   Validate the extension source
  docs   Open the web-ext documentation in a browser

Options:
  --version            Show version number                             [boolean]
  --source-dir, -s     Web extension source directory.
                                                   [string] [required] [default:
                           "/home/c/Documents/deployment/webclient-updatebuild"]
  --artifacts-dir, -a  Directory where artifacts will be saved.
                                                   [string] [required] [default:
         "/home/c/Documents/deployment/webclient-updatebuild/web-ext-artifacts"]
  --verbose, -v        Show verbose output                  [boolean] [required]
  --ignore-files, -i   A list of glob patterns to define which files should be
                       ignored. (Example: --ignore-files=path/to/first.js
                       path/to/second.js "**/*.log")                     [array]
  --no-input           Disable all features that require standard input
                                                            [boolean] [required]
  -h, --help           Show help                                       [boolean]

[git-rev-sync] no git repository found
@cr-nz cr-nz changed the title Current version of web-ext on npm doesn't work Current version of web-ext (2.2.0) on npm doesn't work Oct 13, 2017
@mpopp75
Copy link

mpopp75 commented Oct 13, 2017

I get this after updating web-ext from 2.0.0 to 2.2.0 (via "sudo npm install --global web-ext") on my Xubuntu 16.04.3 64bit:

$ web-ext --version
SyntaxError: Unexpected token .
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (/usr/lib/node_modules/web-ext/node_modules/whatwg-url/lib/public-api.js:3:15)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)

@kumar303
Copy link
Contributor

Hi. Sorry about that. We had some bugs in the deploy script which of course took a couple deploys to fix 🌵 🔥

You can update to web-ext 2.2.2 which is now working. Let me know if you run into trouble.

Fixes:

@mpopp75
Copy link

mpopp75 commented Oct 13, 2017

I still get the same error message with version 2.2.2.

@kumar303
Copy link
Contributor

@mpopp75 which version of Node and npm do you have?

@mpopp75
Copy link

mpopp75 commented Oct 13, 2017

Node is version 4.4.3 and npm is version 3.10.5.

@cr-nz
Copy link
Author

cr-nz commented Oct 15, 2017

@kumar303 Version 2.2.2 is working fine for me now, many thanks!

@itsecurityco
Copy link

I'm getting this error with node version 4.2.6 and web-ext version 2.4.0

@kumar303
Copy link
Contributor

kumar303 commented Feb 2, 2018

@itseco Node 6 is required to install web-ext. This is the current LTS (long term support) version of Node so it should be easy to work with.

@itsecurityco
Copy link

Thanks thats works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants