created the new npm and react-native-textInputBox for learning purpose and try to run that multiply in the other Project getting the error
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 30/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, react-native, typescript
Direzione di ricerca
Inizia riproducendo l’esempio pubblicato di react-native-textinputbox 0.1.0 con l’import di multiply e ispeziona lib/commonjs/index.js insieme a lib/typescript/module/src/index.d.ts. Controlla prima il pacchetto generato e la registrazione del modulo nativo; è completato quando multiply viene eseguito senza l’errore Textinputbox e TypeScript risolve il file di dichiarazione con le impostazioni del modulo riportate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I created a new npm package react-native-textinputbox for learning purposes using the create-react-native-library tool. After publishing the library, I tried using it in another project and encountered an issue when calling the multiply function from the library. I'm seeing the following error:
Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'Textinputbox' could not be found. Verify that a module by this name is registered in the native binary.
Could not find a declaration file for module 'react-native-textinputbox'. '.../node_modules/react-native-textinputbox/lib/commonjs/index.js' implicitly has an 'any' type.
There are types at '.../node_modules/react-native-textinputbox/lib/typescript/module/src/index.d.ts', but this result could not be resolved under your current 'moduleResolution' setting.
there is not typeScript Support as well
Steps to Reproduce:
Create a new npm package react-native-textinputbox using create-react-native-library.
Publish the package to npm.
Install the package in another React Native project.
Import the multiply function from react-native-textinputbox:
javascript
Copy code
import { multiply } from 'react-native-textinputbox';
Call the multiply function like so:
javascript
Copy code
const result = multiply(3, 7);
console.log(result);
Run the app and observe the errors.
Expected Behavior: The multiply function should work as expected without throwing errors, and the TypeScript declaration files should resolve correctly.
Environment:
react-native-textinputbox: 0.1.0
React Native: 0.76.5
TypeScript: 0.76.5
Expo (if applicable): 2.0.53
Possible Solution:
the default example should work as normal comes with the code and not ts support.
it should have the ts support.
- Lingua principale
- JavaScript
- Stelle
- 13.2k
- Fork
- 1.3k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di expo/create-react-native-app
-
eas.json error on buildingAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
expo/create-react-native-app#947 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 10/100
expo/create-react-native-app#946 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 20/100
expo/create-react-native-app#931 · 14 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
expo/create-react-native-app#929 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 32/100
expo/create-react-native-app#927 · 2 commenti · 1 reazione ·
Tutte le issue di expo/create-react-native-app
Issue simili
-
bug data-types
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
ClickHouse/clickhouse-js#1293 ·
I maintainer di solito rispondono entro 1 giorno
-
area: tests help wanted size/s
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
DahanItamar/DockNest#368 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100