Open ganesh42shrma opened 1 month ago
:warning: | Missing Reproducible Example |
---|---|
:information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
:warning: | Add or Reformat Version Info |
---|---|
:information_source: | We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.70.2 |
:warning: | Add or Reformat Version Info |
---|---|
:information_source: | We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.70.2 |
:warning: | Missing Reproducible Example |
---|---|
:information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
Can you run npx @react-native-community/cli config
in your project root and share the output?
@cortinico this is what I am getting
{
"root": "/Users/townscup/Documents/ReactNativeTownCup",
"reactNativePath": "/Users/townscup/Documents/ReactNativeTownCup/node_modules/react-native",
"reactNativeVersion": "0.76",
"dependencies": {
"react-native-config": {
"root": "/Users/townscup/Documents/ReactNativeTownCup/node_modules/react-native-config",
"name": "react-native-config",
"platforms": {
"android": {
"sourceDir": "./node_modules/react-native-config/android",
"buildTypes": []
}
}
}
},
"commands": [
{
"name": "generate-bootsplash <logo>",
"description": "Generate a launch screen using a logo file path (PNG or SVG)",
"options": [
{
"name": "--project-type <string>",
"description": "Project type (\"detect\", \"bare\" or \"expo\")",
"default": "detect"
},
{
"name": "--platforms <list>",
"description": "Platforms to generate for, separated by a comma",
"default": "android,ios,web"
},
{
"name": "--background <string>",
"description": "Background color (in hexadecimal format)",
"default": "#fff"
},
{
"name": "--logo-width <number>",
"description": "Logo width at @1x (in dp - we recommend approximately ~100)",
"default": 100
},
{
"name": "--assets-output <string>",
"description": "Assets output directory path",
"default": "assets/bootsplash"
},
{
"name": "--flavor <string>",
"description": "Android flavor build variant (where your resource directory is)",
"default": "main"
},
{
"name": "--html <string>",
"description": "HTML template file path (your web app entry point)",
"default": "public/index.html"
},
{
"name": "--license-key <string>",
"description": "License key to enable brand and dark mode assets generation"
},
{
"name": "--brand <string>",
"description": "Brand file path (PNG or SVG)"
},
{
"name": "--brand-width <number>",
"description": "Brand width at @1x (in dp - we recommend approximately ~80)",
"default": 80
},
{
"name": "--dark-background <string>",
"description": "[dark mode] Background color (in hexadecimal format)"
},
{
"name": "--dark-logo <string>",
"description": "[dark mode] Logo file path (PNG or SVG)"
},
{
"name": "--dark-brand <string>",
"description": "[dark mode] Brand file path (PNG or SVG)"
}
]
},
{
"name": "bundle",
"description": "Build the bundle for the provided JavaScript entry file.",
"options": [
{
"name": "--entry-file <path>",
"description": "Path to the root JS file, either absolute or relative to JS root"
},
{
"name": "--platform <string>",
"description": "Either \"ios\" or \"android\"",
"default": "ios"
},
{
"name": "--transformer <string>",
"description": "Specify a custom transformer to be used"
},
{
"name": "--dev [boolean]",
"description": "If false, warnings are disabled and the bundle is minified",
"default": true
},
{
"name": "--minify [boolean]",
"description": "Allows overriding whether bundle is minified. This defaults to false if dev is true, and true if dev is false. Disabling minification can be useful for speeding up production builds for testing purposes."
},
{
"name": "--bundle-output <string>",
"description": "File name where to store the resulting bundle, ex. /tmp/groups.bundle"
},
{
"name": "--bundle-encoding <string>",
"description": "Encoding the bundle should be written in (https://nodejs.org/api/buffer.html#buffer_buffer).",
"default": "utf8"
},
{
"name": "--max-workers <number>",
"description": "Specifies the maximum number of workers the worker-pool will spawn for transforming files. This defaults to the number of the cores available on your machine."
},
{
"name": "--sourcemap-output <string>",
"description": "File name where to store the sourcemap file for resulting bundle, ex. /tmp/groups.map"
},
{
"name": "--sourcemap-sources-root <string>",
"description": "Path to make sourcemap's sources entries relative to, ex. /root/dir"
},
{
"name": "--sourcemap-use-absolute-path",
"description": "Report SourceMapURL using its full path",
"default": false
},
{
"name": "--assets-dest <string>",
"description": "Directory name where to store assets referenced in the bundle"
},
{
"name": "--unstable-transform-profile <string>",
"description": "Experimental, transform JS for a specific JS engine. Currently supported: hermes, hermes-canary, default",
"default": "default"
},
{
"name": "--asset-catalog-dest [string]",
"description": "Path where to create an iOS Asset Catalog for images"
},
{
"name": "--reset-cache",
"description": "Removes cached files",
"default": false
},
{
"name": "--read-global-cache",
"description": "Try to fetch transformed JS code from the global cache, if configured.",
"default": false
},
{
"name": "--config <string>",
"description": "Path to the CLI configuration file"
},
{
"name": "--resolver-option <string...>",
"description": "Custom resolver options of the form key=value. URL-encoded. May be specified multiple times."
}
]
},
{
"name": "start",
"description": "Start the React Native development server.",
"options": [
{
"name": "--port <number>"
},
{
"name": "--host <string>",
"default": ""
},
{
"name": "--projectRoot <path>",
"description": "Path to a custom project root"
},
{
"name": "--watchFolders <list>",
"description": "Specify any additional folders to be added to the watch list"
},
{
"name": "--assetPlugins <list>",
"description": "Specify any additional asset plugins to be used by the packager by full filepath"
},
{
"name": "--sourceExts <list>",
"description": "Specify any additional source extensions to be used by the packager"
},
{
"name": "--max-workers <number>",
"description": "Specifies the maximum number of workers the worker-pool will spawn for transforming files. This defaults to the number of the cores available on your machine."
},
{
"name": "--transformer <string>",
"description": "Specify a custom transformer to be used"
},
{
"name": "--reset-cache, --resetCache",
"description": "Removes cached files"
},
{
"name": "--custom-log-reporter-path, --customLogReporterPath <string>",
"description": "Path to a JavaScript file that exports a log reporter as a replacement for TerminalReporter"
},
{
"name": "--https",
"description": "Enables https connections to the server"
},
{
"name": "--key <path>",
"description": "Path to custom SSL key"
},
{
"name": "--cert <path>",
"description": "Path to custom SSL cert"
},
{
"name": "--config <string>",
"description": "Path to the CLI configuration file"
},
{
"name": "--no-interactive",
"description": "Disables interactive mode"
}
]
},
{
"name": "codegen",
"options": [
{
"name": "--path <path>",
"description": "Path to the React Native project root.",
"default": "/Users/townscup/Documents/ReactNativeTownCup"
},
{
"name": "--platform <string>",
"description": "Target platform. Supported values: \"android\", \"ios\", \"all\".",
"default": "all"
},
{
"name": "--outputPath <path>",
"description": "Path where generated artifacts will be output to."
}
]
}
],
"healthChecks": [],
"platforms": {},
"assets": [
"./src/assets/fonts"
],
"project": {}
}
Ok then we would need a full reproducer to help further
This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.
Description
New project created using
npx react-native init Myapp
. I wanted a javascript template so changed the App.tsx to App.js , installed the nodemodules I wanted usingnpm i
command with 0 vulnerabilities. Upon runningnpx react-native run-android
: The error I encounter :package.json :
Settings.gradle file :
Steps to reproduce
npx react-native init yourApp
convert App.tsx to App.js with js code.
install node modules from package.json or with these commands :
npm install @react-native-async-storage/async-storage @react-native-community/netinfo axios body-parser date-fns jwt-decode lottie-react-native moment react react-native react-native-calendars react-native-chart-kit react-native-compressor react-native-device-info react-native-document-picker react-native-fs react-native-gifted-chat react-native-htmlview react-native-http-bridge-refurbished react-native-image-base64 react-native-image-crop-picker react-native-image-picker react-native-keep-awake react-native-network-info react-native-paper react-native-permissions react-native-popup-menu react-native-safe-area-context react-native-share react-native-sqlite-storage react-native-svg react-native-swiper-flatlist react-native-vector-icons react-native-video react-native-view-shot wizpeerTourGuideFe --save
andnpm install @babel/core @babel/preset-env @babel/runtime @react-native/babel-preset @react-native/eslint-config @react-native/metro-config babel-jest eslint jest prettier react-test-renderer --save-dev
runnpx react-native start
and thennpx react-native run-android
React Native Version
0.75.4
Affected Platforms
Runtime - Android
Output of
npx react-native info
Stacktrace or Logs
Reproducer
create using above commands and install the packages and run.
Screenshots and Videos
No response