Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid 'main' field error #47

Open
hcropps opened this issue Sep 3, 2022 · 2 comments
Open

Invalid 'main' field error #47

hcropps opened this issue Sep 3, 2022 · 2 comments

Comments

@hcropps
Copy link

hcropps commented Sep 3, 2022

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
Copy link
Author

hcropps commented Sep 3, 2022

@didix21 @norman784 how can i solve?

@norman784
Copy link
Owner

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

"main": "lib/libimobiledevice.js",

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants