Skip to content

Commit

Permalink
Add known compatible Python/Node dev versions
Browse files Browse the repository at this point in the history
Also update CONTRIBUTING.md to match.

For contribution, add versions we know to work together. @wdio/sync
brings fibers, which needs compilation. That compilation fails for some
combinations of Node and Python:

```
ValueError: invalid mode: 'rU' while trying to load binding.gyp
```

or

```
npm ERR! ../src/fibers.cc:27:65: error: no member named 'kFinalizer' in 'v8::WeakCallbackType'
npm ERR!                 handle.SetWeak(val, WeakCallbackShim<F, P>, WeakCallbackType::kFinalizer);
npm ERR!                                                             ~~~~~~~~~~~~~~~~~~^
```

Fixes #608.
  • Loading branch information
rgarner committed Nov 17, 2023
1 parent db6ccc7 commit 49a0db9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.18.2
v14.21.3
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.10.1
20 changes: 15 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ If you want to help and want to get more familiar with the codebase, try startin

## Requirements

You will need a recent version of Node and npm installed:
You will need a recent version of Node and npm installed. Check the `.nvmrc` for a recommended version:

```bash
$ node -v
v7.10.0
v14.21.3
$ npm -v
v5.0.0
v6.14.18
```

If you want to run the selenium tests, you will also need a local copy of the Java Development Kit:
Expand All @@ -24,13 +24,23 @@ Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
```

To install Node (with npm) and Java locally on macOS, you can use [brew](https://brew.sh/):
To install Node (with npm) and Java locally on macOS, we recommend [brew](https://brew.sh) with
[nvm](https://github.com/nvm-sh/nvm):

```bash
brew install node
brew install nvm
nvm install $(cat .nvmrc)
brew cask install java
```

The `webdriverio` package also needs a compatible version of Python to build. 3.10.x will work with `webdriverio`'s
dependency `node-gyp`. [`pyenv`](https://github.com/pyenv/pyenv) can help if you don't have this version:

```bash
brew install pyenv
pyenv install $(cat .python-version)
```

## Project structure

```
Expand Down

0 comments on commit 49a0db9

Please sign in to comment.