diff --git a/lib/main.js b/lib/main.js index 2c0e699..a8325f9 100644 --- a/lib/main.js +++ b/lib/main.js @@ -14,7 +14,7 @@ export default { } catch (err) { if (err.code === 'MODULE_NOT_FOUND') { console.log('serialport not installed. Installing...'); - require('child_process').execSync('npm install serialport'); + require('child_process').execSync('npm install serialport', { cwd: __dirname + '/..' }); console.log('Installed serialport!'); } }