Cannot import node-api module
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- ios, react-native, typescript
- Área
- mobile
Línea de trabajo
Comienza con la reproducción en App.tsx, babel.config.js y el punto de entrada requireNodeAddon; después, ejecuta los pasos indicados Expo prebuild y npm run ios para reproducir el error de carga del simulador de iOS. Se considera terminado cuando el módulo pshenmic-dpp se importa correctamente y la aplicación de ejemplo renderiza los valores del identificador y de la clave sin el fallo de dyld.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Good day! I started preparing my module for release and encountered a problem during testing in React Native: I couldn't import the napi module either through require with babel.config.js or through requireNodeAddon.
Error:
[DEBUG] [NodeApiHost] [pshenmic-dpp--pshenmic_dpp] Loading addon by '@rpath/pshenmic-dpp--pshenmic_dpp.framework/pshenmic-dpp--pshenmic_dpp'
[DEBUG] [NodeApiHost] NapiHost: Failed to load library '@rpath/pshenmic-dpp--pshenmic_dpp.framework/pshenmic-dpp--pshenmic_dpp': dlopen(@rpath/pshenmic-dpp--pshenmic_dpp.framework/pshenmic-dpp--pshenmic_dpp, 0x0006): tried: '/Users/bebra/Library/Developer/Xcode/DerivedData/expopshenmicdpptest-fkfdlwyzamtrzididrrosigrycfm/Build/Products/Debug-iphonesimulator/pshenmic-dpp--pshenmic_dpp.framework/pshenmic-dpp--pshenmic_dpp' (no such file), '/Library/Developer/CoreSimulator/Volumes/iOS_23C54/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 26.2.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/pshenmic-dpp--pshenmic_dpp.framework/pshenmic-dpp--pshenmic_dpp' (no such file), '/usr/lib/swift/pshenmic-dpp--pshenmic_dpp.framework/pshenmic-dpp--pshenmic_dpp' (no such file, not in dyld cache), '/Users/bebra/Library/Developer/CoreSimulator/Devices/52938A97-D32A-46EB-A0BE-5D731586A09C/data/Containers/Bundle/Application/E542311F-D1B4-4181-B20E-9333E4A5E096/expopshenmicdpptest.app/Frameworks/pshenmic-dpp--pshenmic_dpp.framework/pshenmic-dpp--pshenmic_dpp' (no such file), '/Users/bebra/Library/Developer/CoreSimulator/Devices/52938A97-D32A-46EB-A0BE-5D731586A09C/data/Containers/Bundle/Application/E542311F-D1B4-4181-B20E-9333E4A5E096/expopshenmicdpptest.app/Frameworks/pshenmic-dpp--pshenmic_dpp.framework/pshenmic-dpp--pshenmic_dpp' (no such file), '/Users/bebra/Library/Developer/CoreSimulator/Devices/52938A97-D32A-46EB-A0BE-5D731586A09C/data/Containers/Bundle/Application/E542311F-D1B4-4181-B20E-9333E4A5E096/expopshenmicdpptest.app/pshenmic-dpp--pshenmic_dpp.framework/pshenmic-dpp--pshenmic_dpp' (no such file), '/Library/Developer/CoreSimulator/Volumes/iOS_23C54/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 26.2.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/pshenmic-dpp--pshenmic_dpp.framework/pshenmic-dpp--pshenmic_dpp' (no such file), '/usr/lib/swift/pshenmic-dpp--pshenmic_dpp.framework/pshenmic-dpp--pshenmic_dpp' (no such file, not in dyld cache), '/Users/bebra/Library/Developer/CoreSimulator/Devices/52938A97-D32A-46EB-A0BE-5D731586A09C/data/Containers/Bundle/Application/E542311F-D1B4-4181-B20E-9333E4A5E096/expopshenmicdpptest.app/Frameworks/pshenmic-dpp--pshenmic_dpp.framework/pshenmic-dpp--pshenmic_dpp' (no such file), '/Users/bebra/Library/Developer/CoreSimulator/Devices/52938A97-D32A-46EB-A0BE-5D731586A09C/data/Containers/Bundle/Application/E542311F-D1B4-4181-B20E-9333E4A5E096/expopshenmicdpptest.app/Frameworks/pshenmic-dpp--pshenmic_dpp.framework/pshenmic-dpp--pshenmic_dpp' (no such file), '/Library/Developer/CoreSimulator/Volumes/iOS_23C54/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 26.2.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/pshenmic-dpp--pshenmic_dpp.framework/pshenmic-dpp--pshenmic_dpp' (no such file)
[DEBUG] [NodeApiHost] [pshenmic-dpp--pshenmic_dpp] Failed to load library
Steps for reproduce
- create react native app
- add to dependencies:
"dash-platform-sdk": "https://github.com/pshenmic/dash-platform-sdk#a6687586eff35faa0a35409be7a97294640cf95f",
"react-native-node-api": "1.0.1"
- paste App.tsx
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, View } from 'react-native';
import {IdentifierWASM, IdentityPublicKeyWASM, Purpose, SecurityLevel, KeyType} from "pshenmic-dpp";
export default function App() {
const keyId = 0
const purpose = Purpose.DECRYPTION
const securityLevel = SecurityLevel.HIGH
const keyType = KeyType.ECDSA_SECP256K1
const binaryData = '036a394312e40e81d928fde2bde7880070e4fa9c1d1d9b168da707ea468afa2b48'
const pubKey = new IdentityPublicKeyWASM(
keyId,
purpose,
securityLevel,
keyType,
false,
binaryData)
const id = new IdentifierWASM('GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec')
return (
<View style={styles.container}>
<Text>id base58: {id.base58()}</Text>
<Text>id hex: {pubKey.keyType}</Text>
<StatusBar style="auto" />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
- run
npx expo prebuild - run
npm run ios
This example use requireNodeAddon
I can't say that there might not be a mistake on my part somewhere here. I would appreciate any help.
- Lenguaje dominante
- TypeScript
- Estrellas
- 188
- Forks
- 10
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 3
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de callstackincubator/react-native-node-api
-
Android 🤖
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
-
Sanity check of Hermes source directory via environment variable, when building Android projects AbiertoAndroid 🤖 good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
callstackincubator/react-native-node-api#163 · 1 comentario ·
-
enhancement good first issue gyp-to-cmake
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
callstackincubator/react-native-node-api#161 · 3 comentarios · 1 reacción ·
-
enhancement Host 🏡
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
-
Automatable good first issue
Dificultad 3/5 1-2 días Aptitud para principiantes 15/100
callstackincubator/react-native-node-api#424 · 1 comentario ·
Todos los issues de callstackincubator/react-native-node-api
Issues similares
-
S: triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
fix(errors): EHOSTUNREACH from a happy-eyeballs connect is reported as a resolver error (STAMP-80) Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
snapshot-labs/stamp#666 ·
-
fix(api): prevent leaderboard SSE heartbeat from starting after disconnect during initial load Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
GauravKarakoti/SecureFlow#1070 · 1 comentario ·
-
feature:Languages/Translations good first issue ready Web
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
digitalfabrik/integreat-app#4394 ·