I trying to create React native library using npx create-react-native-library qrscanlib
.
I getting following error while after all configuration like entering author name and repo etc,
✔ Which languages do you want to use? › Java & Objective-C
⠧ Generating example app
⚠️ The `init` command is deprecated.
The behavior will be changed on 12/31/2024 (82 days).
- Switch to npx @react-native-community/cli init for the identical behavior.
- Refer to the documentation for information about alternative tools: https://reactnative.dev/docs/getting-started
Running: npx @react-native-community/cli init
error Invalid Version: latest.
/Users/rj/.npm/_npx/7655a6858458ff34/node_modules/create-react-native-library/lib/utils/spawn.js:27
reject(new Error(stderr.trim()));
^
Error: ⚠️ The `init` command is deprecated.
The behavior will be changed on 12/31/2024 (82 days).
- Switch to npx @react-native-community/cli init for the identical behavior.
- Refer to the documentation for information about alternative tools: https://reactnative.dev/docs/getting-started
Running: npx @react-native-community/cli init
error Invalid Version: latest.
at ChildProcess.<anonymous> (/Users/rj/.npm/_npx/7655a6858458ff34/node_modules/create-react-native-library/lib/utils/spawn.js:27:16)
at Object.onceWrapper (node:events:628:26)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1091:16)
at ChildProcess._handle.onexit (node:internal/child_process:302:5)
As per error this command npx create-react-native-library qrscanlib
will be expire after 82 days, but it must work at this time. React native documentation or create-react-native-library documentation not mention about this error or future upgradation or any alternative.
Any solution on above error or any workaround or any alternate way of creation react native library using npx?
Note : Please don't recommend anyone about use of react native bob builder.
I found workaround command to create a library,
npx create-react-native-library@latest qrscanlib --reactNativeVersion 0.74.2