Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

index.js: The "path" argument must be of type string. Received undefined #592

Closed
1 of 2 tasks
tolzlz opened this issue Jul 20, 2024 · 1 comment
Closed
1 of 2 tasks
Labels
bug Something isn't working

Comments

@tolzlz
Copy link

tolzlz commented Jul 20, 2024

Description

I I use the command npx create-react-native-library@latest react-native-awesome-module to run the example test project. Android internal error index.js: The "path" argument must be of type string. Received undefined

test example MyProject/modules/react-native-awesome-module/example

MyProject
{ "name": "MyProject", "main": "expo-router/entry", "version": "1.0.0", "scripts": { "start": "expo start", "reset-project": "node ./scripts/reset-project.js", "android": "expo start --android", "ios": "expo start --ios", "web": "expo start --web", "test": "jest --watchAll", "lint": "expo lint" }, "jest": { "preset": "jest-expo" }, "dependencies": { "@expo/vector-icons": "^14.0.2", "@react-native-community/masked-view": "^0.1.11", "@react-navigation/native": "^6.0.2", "@react-navigation/stack": "^6.4.0", "android": "^0.0.8", "axios": "^1.7.2", "expo": "~51.0.17", "expo-checkbox": "~3.0.0", "expo-constants": "~16.0.2", "expo-font": "~12.0.7", "expo-image": "~1.12.12", "expo-linking": "~6.3.1", "expo-router": "~3.5.17", "expo-splash-screen": "~0.27.5", "expo-status-bar": "~1.12.1", "expo-system-ui": "~3.0.7", "expo-task-manager": "~11.8.2", "expo-web-browser": "~13.0.3", "mobx": "^6.12.5", "mobx-react": "^9.1.1", "react": "18.2.0", "react-dom": "18.2.0", "react-native": "0.74.3", "react-native-gesture-handler": "~2.16.1", "react-native-reanimated": "~3.10.1", "react-native-safe-area-context": "4.10.1", "react-native-screens": "3.31.1", "react-native-web": "~0.19.10", "yarn": "^1.22.22" }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/plugin-proposal-class-properties": "^7.18.6", "@babel/plugin-proposal-decorators": "^7.24.7", "@types/jest": "^29.5.12", "@types/react": "~18.2.45", "@types/react-dom": "^18.3.0", "@types/react-test-renderer": "^18.0.7", "babel-plugin-transform-decorators-legacy": "^1.3.5", "jest": "^29.2.1", "jest-expo": "~51.0.3", "react-test-renderer": "18.2.0", "typescript": "~5.3.3", "webpack": "^5.92.1", "webpack-cli": "^5.1.4", "webpack-dev-server": "^5.0.4" }, "private": true }

react-native-awesome-module:
{ "name": "react-native-awesome-module", "version": "0.0.0", "description": "test", "main": "src/index", "author": " <> ()", "license": "UNLICENSED", "homepage": "#readme", "devDependencies": { "react": "18.2.0", "react-native": "0.74.3" }, "create-react-native-library": { "type": "module-legacy", "languages": "kotlin-swift", "version": "0.38.2" } }
example
{ "name": "react-native-awesome-module-example", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "start": "react-native start", "build:android": "react-native build-android --extra-params \"--no-daemon --console=plain -PreactNativeArchitectures=arm64-v8a\"", "build:ios": "react-native build-ios --scheme LoginsdkWechatExample --mode Debug --extra-params \"-sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO\"" }, "dependencies": { "react": "18.2.0", "react-native": "0.74.3" }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@react-native/babel-preset": "0.74.85", "@react-native/metro-config": "0.74.85", "@react-native/typescript-config": "0.74.85", "babel-plugin-module-resolver": "^5.0.0" }, "engines": { "node": ">=18" } }

Packages

  • create-react-native-library
  • react-native-builder-bob

Selected options

no

Link to repro

no

Environment

System:
OS: macOS 14.4.1
CPU: (8) arm64 Apple M2
Memory: 65.72 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.2.0
path: /opt/homebrew/bin/node
Yarn:
version: 1.22.22
path: ~/WebstormProjects/cxtapp/node_modules/.bin/yarn
npm:
version: 10.7.0
path: /opt/homebrew/bin/npm
Watchman:
version: 2024.05.06.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods: Not Found
SDKs:
iOS SDK: Not Found
Android SDK:
Android NDK: 25.1.8937393
IDEs:
Android Studio: 2022.1 AI-221.6008.13.2211.9619390
Xcode:
version: /undefined
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.10
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.74.3
wanted: 0.74.3
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: Not found
newArchEnabled: false

user@UserdeMac-mini example % pwd
/Users/user/WebstormProjects/MyProject/modules/react-native-awesome-module/example
user@UserdeMac-mini example %

@tolzlz tolzlz added the bug Something isn't working label Jul 20, 2024
@tolzlz tolzlz closed this as completed Jul 20, 2024
@tolzlz
Copy link
Author

tolzlz commented Jul 20, 2024

You must create src/index.tsx in the example folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant