asfernandes / node-firebird-drivers

Node.js Firebird Drivers
MIT License
54 stars 17 forks source link

Supply pre-compiled binaries #12

Open cognitivim opened 5 years ago

cognitivim commented 5 years ago

resolved #10

note: before publish set NODE_PRE_GYP_GITHUB_TOKEN environment variable (https://github.com/bchr02/node-pre-gyp-github)

cognitivim commented 5 years ago

hi @asfernandes, any ideas on how to fix this?

FAIL src/test/test.ts
  ● Test suite failed to run
    TypeError: require(...) is not a function
      18 | 
      19 | const bindingPath = binary.find(path.resolve(path.join(__dirname, '../../package.json')));
    > 20 | const native = require(bindingPath)('addon'); // require('bindings')('addon')
         |                                    ^
      21 | 
      22 | export const getMaster: (library: string) => Master = native.getMaster;
      23 | export const disposeMaster: (master: Master) => boolean = native.disposeMaster;
      at Object.<anonymous> (src/lib/index.ts:20:36)
      at Object.<anonymous> (src/test/test.ts:4:1)

source: https://github.com/punkusha/node-firebird-drivers/blob/84daae2dababd1a6de8989b24ae3720587f80750/packages/node-firebird-native-api/src/lib/index.ts#L20

sywka commented 5 years ago

@punkusha I think you don't need ('addon') at all

cognitivim commented 5 years ago

I think you don't need ('addon') at all

@sywka, thx!