-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
React native 0.56.* - "Unexpected identifier" #20015
Comments
I have talked about it too much here #18247, and I believe now that it belongs in its own issue! |
It looks like your issue may be missing some necessary information. Can you run |
@react-native-bot, yeah "man", that's just another symptom |
exact same problem here, can't give info! Ps. never used create react native app, did always everything by hand |
Exact same problem here when I ran the command However, when I run the same command on MacOS High Sierra, it works and the mobile app can even be running on physical Android phone. So, I guess this problem only occurs on Windows 10. |
I am having the exact same problem on windows 10! |
Same here after upgrading to 0.56 from 0.55 |
Did they really just put in production something that broke the cli on windows 10? Is there someone that is using 56.0 and that got this to work in Windows 10? |
I believe it is really broken. Upgraded to 0.56, then performed a |
I can also confirm that this only started happening to me after upgrading to 0.56 I haven't tested it on Mac but I am running Windows 10. Ran react-native init and it gave me the same syntax error. |
Same here!!! |
Here the same problem !!!
if you need to create a project you can use the latest stable version directly, it worked for me!
|
I guess, RN team is working on RN 0.56, modifying some parts. |
This morning, I could run my code without any issue with RN 0.56. |
I too have the same problem! |
|
@DanielEncina thank you ! |
ok, this is pretty serious. @danielgindi The "rc" from the title can be removed, this problem affects also the current 0.56 released today |
I think it's a Windows specific problem, I'm running into the same issue. It's been reported here: And there's a pull request pending here: Unfortunately, I could not get that to work either on my end. Anyone had success beating this problem? |
Same problem here. It started when I deleted my node_modules folder and run npm install. EDIT: |
So according to #19654 they released it knowing that it wouldn't have worked on windows, correct? |
I am with the same problem here do we have solution for the same? |
@DanielEncina |
i have same problem, hope it will fixed soon 👍 |
same issue with init of new project |
------------Final Solution------------ |
First, delete node_module. |
Ok, so. Since this seem to be a regression / windows related I'm locking to prevent more useless "me too/+1" comments". I'll check the few valuable comments (thanks @tuomohopia, @johakr and @gengjiawen for the links) to investigate/pin point more the whole issue, and in the meantime: we can understand that upgrading and seeing something breaking is not a positive experience. But this is:
And we even explicitly stated in the blogpost and the changelog about known issues / the awareness that this new release is a massive change so probably something would still break. Again, it's an OSS project and if you don't agree with what the core does you can always fork and maintain your version of the project. There is nothing wrong or weird about it. (or even, just stay on 0.55.x until this is fixed, again, nothing weird about that either) We are doing our best to keep the project moving forward, and sometimes this mean that we break something. The other side of this is that most times there is not enough time/resource investment to cover all the cases (we try to prevent this kind of scenarios by publishing the RCs and have someone that faces the issue to find a fix) but it's not a perfect method. What I can assure you all is this: we hear you, and we will (with your help) try to find a fix as quickly as possible in order to have a 0.56.1 version that will resolve this. |
@kelset I am actually thinking add appveyor to ci system to make sure essential thing works on windows. But I have not discussed with @hramos yet. If he is willing to merge related pr, I am happy to help. And to fix the issue, I am confused too, since |
Yeah I've already pinged a few people in the core, and probably this issue is actually related to this too (#20030). I guess that adding some Windows checks in the CI is becoming more and more necessary, I'll bring it up to the monthly meeting (which will happen this evening). |
@kelset Thanks for the info :) |
Hey everyone, couple of updates related to this issue:
|
Hey everyone, I hope you all had a good weekend, quick update. A potential fix landed on master on Metro: We are testing it to understand if it works as expected, after which we'll try to make sure that 0.56.1 will be able to use it. |
@kelset Can they draft a new release so we can test ? Update: I migrate the change, still not working. |
@gengjiawen sadly it's not that simple because of where that fix is currently (master metro). I'll let you know as soon as I have some more info. |
Thanks, @hzoo says there will be an release to fix this issue on windows (babel/babel#8184), and related pr has merged to master. Maybe we still need to bump babel in metro. |
Yeah I've spoken with him too, but it's "one extra degree of separation". That said, just talked with the Metro dev who has been taking care of it and this is what he told me:
|
Hello everyone! A new release of metro, 0.38.2, has been released and it should fix this issue. Since RN 0.56.0 depends on metro version
This means that to apply the fix you would simply need to remove the node_modules (and if they're using yarn.lock you'll need to also clean metro from the lock file) and reinstall. I'll unlock the issue in order to get some feedback that this new release of metro actually fixes for you all, since there is always the scenario in which we haven't covered every possible Win configuration during our tests. |
For me it resolved the initial issue (so did hotfixing it myself from previous posts). but both solutions lead me to another issue, i cant realy tell if its related
React Native Environment Info: node -v this is done from a clean |
Yes, it happened to me too. I didn't find any combination of babel settings that tell it to correctly use the react-native preset. It doesn't recognize react's modules. And I suspect babel7 broke something else too, but I don't have any proof so don't shoot me. |
For the What I am trying to understand now is if the original issue has been fixed. |
Looks like similar to facebook/metro#181. |
@kelset The original issue was fixed. But really another has occured as @danielgindi and @donjo9 mentioned above. I also tried to do: And I also have |
I had this "AccessibilityInfo" message yesterday and I found that simply restarting my computer fixed it, as silly as that sounds. |
@phillmill I've tried several times to restart 😆 . Didn't help |
Since the original issue is fixed, I'm going to close this and lock it as resolved. As I said in my previous comment, refer to #19953 for the |
Environment
Run
react-native info
in your terminal and paste its contents here.So manually:
[skip envinfo]
Description
Any attempt at
react-native start
or any other react-native cli feature - results in:Reproducible Demo
create-react-native-app
npm run eject
react-native-git-upgrade next
"babel-preset-react-native": "^5.0.1"
to package.json according to the CHANGELOG."babel-preset-react-native"
preset to.babelrc
npm i
react-native start
The text was updated successfully, but these errors were encountered: