open-native
open-native copied to clipboard
hooks error in nativescript 8.8.1
After updating to nativescript 8.8.1, I was getting the error below when building.
[@open-native/core/hooks/before-prepare.js] Autolinking React Native ios native modules...
TypeError: (0 , glob_1.glob)(...).then is not a function
at /Users/wjchoi/workspace/mobile/centumpay/ns8_customer/node_modules/@open-native/core/hooks/ios/common.js:26:44
at new Promise (<anonymous>)
at globProm (/Users/wjchoi/workspace/mobile/centumpay/ns8_customer/node_modules/@open-native/core/hooks/ios/common.js:25:12)
at getPackageAutolinkInfo (/Users/wjchoi/workspace/mobile/centumpay/ns8_customer/node_modules/@open-native/core/hooks/ios/getters/autolink-info.js:19:50)
at /Users/wjchoi/workspace/mobile/centumpay/ns8_customer/node_modules/@open-native/core/hooks/ios/prepare.js:14:125
at Array.map (<anonymous>)
at autolinkIos (/Users/wjchoi/workspace/mobile/centumpay/ns8_customer/node_modules/@open-native/core/hooks/ios/prepare.js:14:61)
at async module.exports (/Users/wjchoi/workspace/mobile/centumpay/ns8_customer/node_modules/@open-native/core/hooks/before-prepare.js:73:24)
(0 , glob_1.glob)(...).then is not a function
I did the following temporarily.
Add in the @open-native/core/hooks/ios/common.js file
const { promisify } = require('util');
const globPromise = promisify(glob_1);
Change function
function globProm(pattern, options) {
return globPromise(pattern, options);
}
+1
same error here
In nativescript 8.8.2 same here
Hi @wjchoi87 @vallemar @matteo6b @mariokehl this is most likely related to your project dependencies pulling in different glob versions. You can setup "overrides" or "resolutions" in your project's package.json to specify this version (and also add this dependency explicitly to your package.json):
"glob": "^10.0.0"