Cannot import node-api module
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- ios, react-native, typescript
- 領域
- mobile
調査の方向性
まず App.tsx、babel.config.js、requireNodeAddon エントリーポイントを使って再現を開始し、次に記載されている Expo prebuild と npm run ios の手順を実行して、iOS シミュレーターの読み込みエラーを再現します。完了の条件は、モジュール pshenmic-dpp が正常にインポートされ、サンプルアプリが dyld エラーなしで識別子とキーの値をレンダリングすることです。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 188
- フォーク
- 10
- 平均マージ
- 2日 17時間
- マージ済み PR(30日)
- 3
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
callstackincubator/react-native-node-api のほかの issue
-
Android 🤖
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
-
Sanity check of Hermes source directory via environment variable, when building Android projects オープンAndroid 🤖 good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
callstackincubator/react-native-node-api#163 · コメント 1 件 ·
-
enhancement good first issue gyp-to-cmake
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
callstackincubator/react-native-node-api#161 · コメント 3 件 · リアクション 1 件 ·
-
enhancement Host 🏡
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
Automatable good first issue
難易度 3/5 1〜2日 初心者へのやさしさ 15/100
callstackincubator/react-native-node-api#424 · コメント 1 件 ·
callstackincubator/react-native-node-api の issue をすべて見る
似ている issue
-
S: triage
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
fix(errors): EHOSTUNREACH from a happy-eyeballs connect is reported as a resolver error (STAMP-80) オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
snapshot-labs/stamp#666 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
GauravKarakoti/SecureFlow#1070 · コメント 1 件 ·
-
feature:Languages/Translations good first issue ready Web
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
digitalfabrik/integreat-app#4394 ·