created the new npm and react-native-textInputBox for learning purpose and try to run that multiply in the other Project getting the error
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, react-native, typescript
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện ví dụ react-native-textinputbox 0.1.0 đã được công bố với import multiply và kiểm tra lib/commonjs/index.js cùng với lib/typescript/module/src/index.d.ts. Trước tiên, hãy kiểm tra package đã được tạo và việc đăng ký native module; được xem là hoàn tất khi multiply chạy mà không có lỗi Textinputbox và TypeScript phân giải được tệp khai báo theo các thiết lập module được nêu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- JavaScript
- Star
- 13.2k
- Fork
- 1.3k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của expo/create-react-native-app
-
eas.json error on buildingĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
expo/create-react-native-app#947 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 10/100
expo/create-react-native-app#946 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
expo/create-react-native-app#931 · 14 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
expo/create-react-native-app#929 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
expo/create-react-native-app#927 · 2 bình luận · 1 reaction ·
Tất cả issue của expo/create-react-native-app
Issue tương tự
-
bug data-types
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
ClickHouse/clickhouse-js#1293 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: tests help wanted size/s
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
DahanItamar/DockNest#368 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100