error: Found argument 'index.tsx' which wasn't expected, or isn't valid in this context
See original GitHub issueOS:
- Windows
- MacOS
- Linux
Platform:
- iOS
- Android
SDK:
-
@sentry/react-native
(>= 1.0.0) -
react-native-sentry
(<= 0.43.2)
SDK version: 4.12.0
react-native
version: 0.66.5
Are you using Expo?
- Yes
- No
Are you using sentry.io or on-premise?
- sentry.io (SaaS)
- on-premise
I have following issue:
After installing sentry and run the below commands the app cannot build for iOS. It works fine on android though.
in project.pbxproj
file i have
Bundle React Native code and images:
shellScript = "export SENTRY_PROPERTIES=sentry.properties\nexport EXTRA_PACKAGER_ARGS=\"--sourcemap-output $DERIVED_FILE_DIR/main.jsbundle.map\"\nset -e\n\nexport NODE_BINARY=node\n../node_modules/@sentry/cli/bin/sentry-cli react-native xcode ../node_modules/react-native/scripts/react-native-xcode.sh index.tsx\n\n/bin/sh ../node_modules/@sentry/react-native/scripts/collect-modules.sh\n";
Upload Debug Symbols to Sentry:
export SENTRY_PROPERTIES=sentry.properties\n../node_modules/@sentry/cli/bin/sentry-cli upload-dsym
Steps to reproduce:
yarn add @sentry/react-native
yarn sentry-wizard -i reactNative -p ios android
cd ios && pod install
- Build the app using Xcode
Actual result:
error: Found argument 'index.tsx' which wasn't expected, or isn't valid in this context
USAGE:
sentry-cli react-native xcode [OPTIONS] [BUILD_SCRIPT] [-- <ARGS>...]
For more information try --help
Expected result:
Should be able to build successfully.
Issue Analytics
- State:
- Created 9 months ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Getting error: Found argument '--webdriver-port' which wasn't ...
Issue is resolved as there is problem "In the current revision (after 0.9.0), the argument webdriver-port was renamed to port.
Read more >webdriver-port' which wasn't expected, or isn't valid in this ...
When I run my selenium code, I get this error error: Found argument '--webdriver-port' which wasn't expected, or isn't valid in this context...
Read more >Documentation - Everyday Types - TypeScript
In this chapter, we'll cover some of the most common types of values you'll find in JavaScript code, and explain the corresponding ways...
Read more >Changelog - Cypress Documentation
The Cypress App will no longer crash when passed a --spec: {} from the CLI and instead error when passed an invalid object...
Read more >VS Code API | Visual Studio Code Extension API
However, when invoking an editor command not all argument types are supported. ... export function activate(context: vscode.ExtensionContext) { let api ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Finally found a solution. Remove the
index.tsx
from the original script in the question as mentioned by @krystofwoldrich and addexport ENTRY_FILE=index.tsx
to the script. That solves the issue.So, here is how the script would look like
Another solution that i found, but NOT recommended is, changing the file
node_modules/react-native/scripts/react-native-xcode.sh:74
replaceENTRY_FILE=${1:-index.js}
withENTRY_FILE=${1:-index.tsx}
Hope this resolves the issue if anyone else if facing it
will give it a try when i get to work on monday
just to clarify, you want me to change it to this