improve workflow

This commit is contained in:
Guillermo Rauch 2016-07-13 14:06:05 -07:00
parent 477e40e433
commit 2143bc7b77
4 changed files with 13 additions and 14 deletions

View file

@ -6,7 +6,7 @@ To install `package.json` dependencies in a way where the native
modules are built with `electron`, run: modules are built with `electron`, run:
```bash ```bash
$ ./install.sh $ ./scripts/install.sh
``` ```
Then, you want to make sure `app/dist` is populated. I recommend Then, you want to make sure `app/dist` is populated. I recommend
@ -26,15 +26,3 @@ $ npm start
``` ```
...to launch the app! ...to launch the app!
## Common Errors
### `Error: Module version mismatch. Expected 48, got 47`
If you get this error after `npm start`, simply remove the `node_modules` folder and try to install again using following command:
```
sudo ./install.sh
```
More details: https://github.com/zeit/hyperterm/issues/72

View file

@ -1,8 +1,19 @@
const { EventEmitter } = require('events'); const { EventEmitter } = require('events');
const { spawn } = require('child_pty');
const { exec } = require('child_process'); const { exec } = require('child_process');
const defaultShell = require('default-shell'); const defaultShell = require('default-shell');
let spawn;
try {
spawn = require('child_pty').spawn;
} catch (err) {
console.error(
'A native module failed to load. Typically this means ' +
'you installed the modules incorrectly.\n Use `scripts/install.sh` ' +
'to trigger the installation.\n ' +
'More information: https://github.com/zeit/hyperterm/issues/72'
);
}
const TITLE_POLL_INTERVAL = 500; const TITLE_POLL_INTERVAL = 500;
module.exports = class Session extends EventEmitter { module.exports = class Session extends EventEmitter {