libimobiledevice-node icon indicating copy to clipboard operation
libimobiledevice-node copied to clipboard

Invalid 'main' field error

Open hcropps opened this issue 3 years ago • 2 comments

I installed the library with no problem. But when I want to run it I get the following error

Invalid 'main' field in '/node_modules/libimobiledevice/package.json' of 'lib/libimobiledevice.js'. Please either fix that or report it to the module author

(node:427987) [DEP0128] DeprecationWarning: Invalid 'main' field in '/Documents/imobileNode/node_modules/libimobiledevice/package.json' of 'lib/libimobiledevice.js'. Please either fix that or report it to the module author (Use node --trace-deprecation ... to show where the warning was created) node:internal/modules/cjs/loader:1210 return process.dlopen(module, path.toNamespacedPath(filename)); ^

Error: /Documents/imobileNode/node_modules/libimobiledevice/build/Release/imobiledevice.node: undefined symbol: gnutls_malloc at Object.Module._extensions..node (node:internal/modules/cjs/loader:1210:18) at Module.load (node:internal/modules/cjs/loader:1004:32) at Function.Module._load (node:internal/modules/cjs/loader:839:12) at Module.require (node:internal/modules/cjs/loader:1028:19) at require (node:internal/modules/cjs/helpers:102:18) at Object. (//Documents/imobileNode/node_modules/libimobiledevice/lib/workers/backup2_worker.js:1:13) at Module._compile (node:internal/modules/cjs/loader:1126:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10) at Module.load (node:internal/modules/cjs/loader:1004:32) at Function.Module._load (node:internal/modules/cjs/loader:839:12) { code: 'ERR_DLOPEN_FAILED' }

hcropps avatar Sep 03 '22 21:09 hcropps

@didix21 @norman784 how can i solve?

hcropps avatar Sep 03 '22 21:09 hcropps

I think it will be fixed with just changing or removing this line

https://github.com/norman784/libimobiledevice-node/blob/061a9620d498aef3dc9af88b7088ce9ea07a7628/package.json#L5

But I don't have time to test if that solves the problem right now. If you could try and see if that works and submit a PR I can merge it for you, if you do that don't forget to bump the version also.

norman784 avatar Sep 05 '22 11:09 norman784