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

Building instructions are incomplete. #108

Closed
BoQsc opened this issue Apr 11, 2018 · 5 comments
Closed

Building instructions are incomplete. #108

BoQsc opened this issue Apr 11, 2018 · 5 comments

Comments

@BoQsc
Copy link

BoQsc commented Apr 11, 2018

https://github.com/mozilla/webextension-polyfill#building
After installing Node.js that distributes npm package manager,
I followed futher instructions

npm install
npm run build
npm run test

That do state only general commands.

So, after installation I ran these commands, and as funny as that sounds to say - they are incomplete.
And I saw error after error that asks for futher information and even git installed.
This is where it became clear that instructions are for sure unclear for beginners.

C:\Users\user>npm install https://github.com/mozilla/webextension-polyfill
npm ERR! code ENOGIT
npm ERR! No git binary found in $PATH
npm ERR!
npm ERR! Failed using git.
npm ERR! Please check if you have git installed and in your PATH.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\user\AppData\Roaming\npm-cache\_logs\2018-04-11T16_57_11_822Z-debug.log

What is the correct complete way to install this polyfill through npm package manager?
Is the git and github actually required?
By refering to https://github.com/mozilla/webextension-polyfill#building

To build, assuming you're already installed node >= 6 and npm, simply run:

There is no mention of the git and how to get the copy of the polyfill.

@Rob--W
Copy link
Member

Rob--W commented Apr 12, 2018

We don't use git itself, but perhaps one of the dependencies depends on a git repo (I haven't checked). What's the content of the npm debug log?

@BoQsc
Copy link
Author

BoQsc commented Apr 12, 2018

The problem is not with the dependencies, but a missing part in README on how to correctly acquire/get/download version of webextension polyfill for production.
There is no need for debug log. It is just me being new to npm, seeing that the steps to download this polyfill for production are missing, or I do not know something.

@Rob--W
Copy link
Member

Rob--W commented Apr 12, 2018

The problem is not with the dependencies, but a missing part in README on how to correctly acquire/get/download version of webextension for production.

If you want to use the package with minimal efforts, use npm install webextension-polyfill .

There is no need for debug log.

As said, the source code (hosted in this Github repo) itself does not directly depend on any git repository. If you provide the debug log, we can see where exactly the git dependency originates from, and either update the README to ask for git, or change our own dependencies so that we do not indirectly depend on git.

@BoQsc
Copy link
Author

BoQsc commented Apr 12, 2018

@Rob--W
Thank you for response, here it is: a command execution log with a debug log.

C:\Users\user>npm install https://github.com/mozilla/webextension-polyfill
npm ERR! code ENOGIT
npm ERR! No git binary found in $PATH
npm ERR!
npm ERR! Failed using git.
npm ERR! Please check if you have git installed and in your PATH.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\user\AppData\Roaming\npm-cache\_logs\2018-04-12T18_07_06_760Z-debug.log

2018-04-12T18_07_06_760Z-debug.log

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'https://github.com/mozilla/webextension-polyfill' ]
2 info using [email protected]
3 info using [email protected]
4 verbose config Skipping project config: C:\Users\user/.npmrc. (matches userconfig)
5 verbose npm-session 54c134646746bd94
6 silly install loadCurrentTree
7 silly install readLocalPackageData
8 silly fetchPackageMetaData error for git+https://github.com/mozilla/webextension-polyfill.git No git binary found in $PATH
9 verbose stack Error: No git binary found in $PATH
9 verbose stack at checkGit (C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\lib\util\git.js:203:17)
9 verbose stack at spawnGit (C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\lib\util\git.js:182:10)
9 verbose stack at pinflight (C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\lib\util\git.js:114:12)
9 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\promise-inflight\inflight.js:29:24
9 verbose stack at Promise._execute (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\debuggability.js:303:9)
9 verbose stack at Promise._resolveFromExecutor (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:483:18)
9 verbose stack at new Promise (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:79:10)
9 verbose stack at _inflight (C:\Program Files\nodejs\node_modules\npm\node_modules\promise-inflight\inflight.js:28:25)
9 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\promise-inflight\inflight.js:22:14
9 verbose stack at tryCatcher (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
9 verbose stack at Promise._settlePromiseFromHandler (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:512:31)
9 verbose stack at Promise._settlePromise (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18)
9 verbose stack at Promise._settlePromiseCtx (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:606:10)
9 verbose stack at Async._drainQueue (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:138:12)
9 verbose stack at Async._drainQueues (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:143:10)
9 verbose stack at Immediate.Async.drainQueues [as _onImmediate] (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14)
10 verbose cwd C:\Users\user
11 verbose Windows_NT 10.0.16299
12 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "https://github.com/mozilla/webextension-polyfill"
13 verbose node v9.11.1
14 verbose npm v5.6.0
15 error code ENOGIT
16 error No git binary found in $PATH
17 error Failed using git.
17 error Please check if you have git installed and in your PATH.
18 verbose exit [ 1, true ]

@Rob--W
Copy link
Member

Rob--W commented Apr 14, 2018

Using npm 5.8.0, I can reproduce your error if I use npm install https://github.com/mozilla/webextension-polyfill

However, that is not the documented way to get the polyfill. If you have already got a copy of the repository (either by cloning the repository with git, or by downloading the zip archive), then the steps from the README successfully completes without any issues (npm install, etc.).

And again, for use in production, you should not use either of the above commands, but use the following:

npm install webextension-polyfill

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

No branches or pull requests

2 participants