You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unhandled JS Exception: Unexpected token '{'. import call expects exactly one argument. no stack #24094
Without a repository of your source, it's hard to give specific advice. This seems like an environment issue, but please do follow up with more detail if my pointers above don't help.
Having the same issue.. Cant see whats causing this nonsense.. Metro running fine, everything compiles.. Upon app launch this error comes up with no indication.. Nothing in the console either..
I had a similar issue with error Unhandled JS Exception: Unexpected identifier 'App'. import call expects exactly one argument. no stack
So the problem is apparently import App from './App';
I had several code blocks and reminders commented out above it, removing all these comments then the build is successful. So I suggest you to check your import methods.
Also, be careful when comment out code in RN in general, especially within render function. Hope it's helpful.
Activity
karanjthakkar commentedon Mar 21, 2019
Can you provide a minimal reproducible example for this? That would help us narrow down the issue better.
Gerlison commentedon Mar 22, 2019
Seems like a error in your code. Can you provide a screenshot of console with Debug JS Remotely?
turnrye commentedon Mar 22, 2019
Hey @Steffi3rd, I suspect that there's actually an issue in your project's code. I think if you look at Metro, you'll see a build-time error.
A few tips:
Without a repository of your source, it's hard to give specific advice. This seems like an environment issue, but please do follow up with more detail if my pointers above don't help.
Steffi3rd commentedon Mar 22, 2019
Thanks for your anwser, I did this :
Now the error has changed but similar.
I don't any details on "Extra Info"
SourceCipher commentedon May 12, 2019
Having the same issue.. Cant see whats causing this nonsense.. Metro running fine, everything compiles.. Upon app launch this error comes up with no indication.. Nothing in the console either..
MaxBabenko commentedon May 23, 2019
Got the same error. Renaming root
index.jstoindex.ios.jsdid the trick for me. But I'm not sure what is the real issue heregianpaj commentedon May 24, 2019
Upgrading to these versions seems to have fixed this issue for me on
react-native v0.59.8package.json"devDependencies": { - "@babel/core": "^7.4.4", - "@babel/runtime": "^7.4.4", + "@babel/core": "^7.4.5", + "@babel/runtime": "^7.4.5", @@ -101,7 +101,7 @@ - "metro-react-native-babel-preset": "^0.54.0", + "metro-react-native-babel-preset": "^0.54.1",satya164 commentedon May 30, 2019
I'm closing this issue since no repro was provided.
jeffreyhaen commentedon Jun 13, 2019
I'm having the same issue after upgrading to RN 0.59.9. The error message gives basically no clue what's wrong...
unmec commentedon Sep 11, 2019
I had a similar issue with error
Unhandled JS Exception: Unexpected identifier 'App'. import call expects exactly one argument. no stackSo the problem is apparently
import App from './App';I had several code blocks and reminders commented out above it, removing all these comments then the build is successful. So I suggest you to check your import methods.
Also, be careful when comment out code in RN in general, especially within render function. Hope it's helpful.
unmec commentedon Sep 11, 2019
UPDATE
OK here is the digest of a few good hours spent:
In your
index.js, there is something like this:Which import the name from app.json
To get rid of this error, just change
index.jsto:and stop importing that json file.
You can keep all your present settings in
devDependenciesghasemikasra39 commentedon Oct 5, 2019
same issue
wuweijian1997 commentedon Oct 24, 2019
Windows 10 - Android

info React Native Environment Info: System: OS: Windows 10 CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz Memory: 1.19 GB / 7.91 GB Binaries: Node: 10.16.3 - C:\kafka\setting\node\node.EXE Yarn: 1.19.1 - C:\kafka\setting\yarn\bin\yarn.CMD npm: 6.9.0 - C:\kafka\setting\node\npm.CMDsame issue
ajGingrich commentedon Oct 27, 2019
I fixed this problem by deleting the entire
babel.config.jsfor the time being and letting react-native handle babelwonga151 commentedon Feb 9, 2020
If this helps anyone I had the same issue and this helped me solve it. #21530 (comment)