Black Lives Matter. Please consider donating to Black Girls Code today.

Unable to build and run server from source

I have started using Falcon SQL Client and was interested in contributing to the project. I wanted to build the project from source; however, when I build the code I get an error about no build directory. Here is the process that I have followed:

Environment:
-Mac
-Node Version: v6.11.5
-NPM: 3.10.10

  • Yarn: 1.3.2

Here are the steps I followed:

  1. I cloned the project from github
  2. I installed the project
    From Docs
$ cd falcon-sql-client
$ yarn install
$ yarn run rebuild:modules:electron
  1. To build the server I did the following:
$ yarn run build-headless

NOTE:
When I run the build process I get a couple of Warnings:

WARNING in ./node_modules/encoding/lib/iconv-loader.js
9:12-34 Critical dependency: the request of a dependency is an expression
 @ ./node_modules/encoding/lib/iconv-loader.js
 @ ./node_modules/encoding/lib/encoding.js
 @ ./node_modules/node-fetch/lib/body.js
 @ ./node_modules/node-fetch/index.js
 @ ./backend/routes.js
 @ ./backend/headless.development.js
WARNING in ./node_modules/ws/lib/BufferUtil.js
Module not found: Error: Can't resolve '../build/Release/bufferutil' in '/Users/shannonlal/Personel/Technology/plot.ly/falcon-sql-client/node_modules/ws/lib'
 @ ./node_modules/ws/lib/BufferUtil.js 8:19-57
 @ ./node_modules/ws/lib/Sender.js
 @ ./node_modules/ws/index.js
 @ ./node_modules/thrift/lib/nodejs/lib/thrift/ws_connection.js
 @ ./node_modules/thrift/lib/nodejs/lib/thrift/index.js
 @ ./node_modules/node-impala/lib/node-impala.js
 @ ./node_modules/node-impala/index.js
 @ ./backend/persistent/datastores/impala.js
 @ ./backend/persistent/datastores/Datastores.js
 @ ./backend/routes.js
 @ ./backend/headless.development.js
WARNING in ./node_modules/ws/lib/Validation.js
Module not found: Error: Can't resolve '../build/Release/validation' in '/Users/shannonlal/Personel/Technology/plot.ly/falcon-sql-client/node_modules/ws/lib'
 @ ./node_modules/ws/lib/Validation.js 8:19-57
 @ ./node_modules/ws/lib/Receiver.js
 @ ./node_modules/ws/index.js
 @ ./node_modules/thrift/lib/nodejs/lib/thrift/ws_connection.js
 @ ./node_modules/thrift/lib/nodejs/lib/thrift/index.js
 @ ./node_modules/node-impala/lib/node-impala.js
 @ ./node_modules/node-impala/index.js
 @ ./backend/persistent/datastores/impala.js
 @ ./backend/persistent/datastores/Datastores.js
 @ ./backend/routes.js
 @ ./backend/headless.development.js

To run the server I did the following:

$ yarn run start-headless

And I get the following error:

cross-env NODE_ENV=production node ./dist/headless-bundle.js
{ Error: Cannot find module "./build"
    at /Users/shannonlal/Personel/Technology/plot.ly/falcon-sql-client/dist/headless-bundle.js:151:16226
    at Object.r.keys (/Users/shannonlal/Personel/Technology/plot.ly/falcon-sql-client/dist/headless-bundle.js:151:16302)
    at t (/Users/shannonlal/Personel/Technology/plot.ly/falcon-sql-client/dist/headless-bundle.js:2:101)
    at Object.i.addProbe.t.fire (/Users/shannonlal/Personel/Technology/plot.ly/falcon-sql-client/dist/headless-bundle.js:151:6471)
    at t (/Users/shannonlal/Personel/Technology/plot.ly/falcon-sql-client/dist/headless-bundle.js:2:101)
    at Object.t (/Users/shannonlal/Personel/Technology/plot.ly/falcon-sql-client/dist/headless-bundle.js:2:62154)
    at t (/Users/shannonlal/Personel/Technology/plot.ly/falcon-sql-client/dist/headless-bundle.js:2:101)
    at Object.<anonymous> (/Users/shannonlal/Personel/Technology/plot.ly/falcon-sql-client/dist/headless-bundle.js:151:280)
    at t (/Users/shannonlal/Personel/Technology/plot.ly/falcon-sql-client/dist/headless-bundle.js:2:101)
    at /Users/shannonlal/Personel/Technology/plot.ly/falcon-sql-client/dist/headless-bundle.js:2:451 code: 'MODULE_NOT_FOUND' }
Error: Module version mismatch. Expected 48, got 54.

Any information would be greatly appreciated.

Thanks in advance

Shannon

Just to add some more information:
I can run the electron application using the following command:

Run the app with

$ yarn run build
$ yarn run start

I get similar warnings as described above; however, I am able to get the app to start and launch. When I do, I get the following error as well:

{ Error: Cannot find module "./build"
at /Users/shannonlal/Personel/Technology/plot.ly/falcon-sql-client/backend/main.js:151:16870
at Object.r.keys (/Users/shannonlal/Personel/Technology/plot.ly/falcon-sql-client/backend/main.js:151:16946)
at t (/Users/shannonlal/Personel/Technology/plot.ly/falcon-sql-client/backend/main.js:2:101)
at Object.i.addProbe.t.fire (/Users/shannonlal/Personel/Technology/plot.ly/falcon-sql-client/backend/main.js:151:7115)
at t (/Users/shannonlal/Personel/Technology/plot.ly/falcon-sql-client/backend/main.js:2:101)
at Object.e.exports (/Users/shannonlal/Personel/Technology/plot.ly/falcon-sql-client/backend/main.js:2:62155)
at t (/Users/shannonlal/Personel/Technology/plot.ly/falcon-sql-client/backend/main.js:2:101)
at Object.I (/Users/shannonlal/Personel/Technology/plot.ly/falcon-sql-client/backend/main.js:151:295)
at t (/Users/shannonlal/Personel/Technology/plot.ly/falcon-sql-client/backend/main.js:2:101)
at /Users/shannonlal/Personel/Technology/plot.ly/falcon-sql-client/backend/main.js:2:451 code: ‘MODULE_NOT_FOUND’ }
Error: The module '/Users/shannonlal/Personel/Technology/plot.ly/falcon-sql-client/node_modules/dtrace-provider/build/Release/DTraceProviderBindings.node’
was compiled against a different Node.js version using
NODE_MODULE_VERSION 48. This version of Node.js requires
NODE_MODULE_VERSION 54. Please try re-compiling or re-installing

I figured out that the issue was related to some outdated documentation. I was able to find the correct documentation and I updated the Contributing.md. This was defined as an issue on github #308.

the issue has now be resolved