devicehive / devicehive-plugin-cassandra-node

DeviceHive Cassandra storage plugin. NodeJS implementation.
Apache License 2.0
4 stars 4 forks source link

Error: Cannot find module '../cassandraSchemas/cassandra-tables' #27

Open tomyc opened 6 years ago

tomyc commented 6 years ago

Hi, My first try with Devicehive Cassandra plugin and I'm facing a problem as follows:

Recreating devicehive-plugin-cassandra-node_schema_1 ... done
Recreating devicehive-plugin-cassandra-node_plugin_1 ... done
Attaching to devicehive-plugin-cassandra-node_schema_1, devicehive-plugin-cassandra-node_plugin_1
schema_1  | > devicehive-plugin-cassandra-node@1.0.0 schema /usr/src/app
schema_1  | > node ./plugin/cassandraSchema/index.js
schema_1  |
schema_1  | module.js:557
schema_1  |     throw err;
schema_1  |     ^
schema_1  |
schema_1  | Error: Cannot find module '../cassandraSchemas/cassandra-tables'

and then:

devicehive-plugin-cassandra-node_schema_1 exited with code 1
plugin_1  |
plugin_1  | > devicehive-plugin-cassandra-node@1.0.0 start /usr/src/app
plugin_1  | > node ./plugin/index.js
plugin_1  |
plugin_1  | module.js:557
plugin_1  |     throw err;
plugin_1  |     ^
plugin_1  |
plugin_1  | Error: Cannot find module '../cassandraSchemas/cassandra-tables'

I was going with steps described in section "How it works". Thanks in advice for your helpful posts.

Regards, Tom

tomyc commented 6 years ago

Temporary solution: in my case with docker-compose version 1.22.0, volumes cassandraConfig and cassandraSchema are not mapped. I haven't investigated the reason for such a problem. So the temporary solution is to copy mentioned directories to the plugin directory and editing files plugin/CassandraPluginService.js and plugin/cassandraSchema/index.js to reflect the changes of the path to the directories.