Search code examples
node.jsoracle-databasekarma-runnerkarma-mochanode-oracledb

Karma: node-oracledb is not imported well


I have node-oracledb "oracledb": "1.11.0" running well in my project, but don't work well in my tests.

After $ npm test command:

15 11 2016 23:29:56.074:ERROR [framework.browserify]: Error: Cannot find
module '../build/Release/oracledb' from 
'/Users/myuser/myproject/node_modules/oracledb/lib'

I don't understand what is happen, I need to put something in karma.conf file to enable oracledb commonjs dependence?

I'm a little bit lost and any suggestion will be great 😊

Thank you so much!


Solution

  • You need to update your package.json so as not to include oracledb. See the following: https://github.com/oracle/node-oracledb/issues/424#issuecomment-224235065