Hi Team,

I ran into an issue running Scratch 2 plugin in MacOS while following this blog.
https://www.generationrobots.com/blog/e ... ot-vortex/

In Vortex plugin installation I downloaded and unzipped the plugin. But faced with error when running the plugin.
https://github.com/DFRobot/DFResources/ ... tch_EN.zip

When the following command is run in MacOS - 10.12.6
> node vortex.js
Code: Select all
Error: Cannot find module '<path>/DF4Scratch_EN/contents/node_modules/serialport/build/serialport/v1.7.4/Release/node-v57-darwin-x64/serialport.node'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (<path>/DF4Scratch_EN/contents/node_modules/serialport/serialport.js:14:25)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
error: Forever detected script exited with code: 1
error: Script restart attempt #227
    throw err;
I tried npm install on node_module/serialport but more errors.
Code: Select all
node-pre-gyp http GET https://node-serialport.s3.amazonaws.com/serialport/v1.7.4/Release/node-v57-darwin-x64.tar.gz
node-pre-gyp ERR! stack Error: Cannot find module 'internal/fs'
node-pre-gyp ERR! stack     at Function.Module._resolveFilename (module.js:485:15)
node-pre-gyp ERR! stack     at Function.Module._load (module.js:437:25)
node-pre-gyp ERR! stack     at Module.require (module.js:513:17)
node-pre-gyp ERR! stack     at require (internal/module.js:11:18)
node-pre-gyp ERR! stack     at evalmachine.<anonymous>:40:20
node-pre-gyp ERR! stack     at Object.<anonymous> (<path>/DF4Scratch_EN/contents/node_modules/serialport/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/fs.js:11:1)
node-pre-gyp ERR! stack     at Module._compile (module.js:569:30)
node-pre-gyp ERR! stack     at Object.Module._extensions..js (module.js:580:10)
node-pre-gyp ERR! stack     at Module.load (module.js:503:32)
node-pre-gyp ERR! stack     at tryModuleLoad (module.js:466:12)
node-pre-gyp ERR! System Darwin 16.7.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/9.4.0/bin/node" "<path>/DF4Scratch_EN/contents/node_modules/serialport/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd <path>/DF4Scratch_EN/contents/node_modules/serialport
node-pre-gyp ERR! node -v v8.1.2
node-pre-gyp ERR! node-pre-gyp -v v0.6.7
node-pre-gyp ERR! This is a bug in `node-pre-gyp`.
node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help:
node-pre-gyp ERR!     <https://github.com/mapbox/node-pre-gyp/issues>
npm WARN enoent ENOENT: no such file or directory, open '<path>/DF4Scratch_EN/contents/package.json'
Is there a built in module available for MacOS or should I build it from source?

Hi Everyone,

Good news! I was able to run the vortex.js with few changes to match the serialport 6.2.2 in my MacOS 10.12.6. However, even after paring the Vortex (VT) with my Mac, I could not see a serial port to which vortex.js can connect to. Apparently, the bluetooth adapter of the Mac is not communicating with VT properly. I even bought a new bluetooth device (BT 4, USB 2) and connect it to the Mac and installed the VirtualBox to host Ubuntu 18.04.1 LTE to test bluetooth connectivity. Having updated the drivers (this wasn't not straightforward and I will not describe how I did it for now) in Ubuntu, I was able to connect to VT but it keep asking for the key which I couldn't find anywhere in the web. Is anyone know about the bluetooth paring key. I am not quite sure how much is involved even if I get it paired to get it to work as a serial device. As per the following post, it seems that the special BT dongle is required for the proper communication.