-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Release Build bundle step fails with SyntaxError unexpected token in joi #27860
Comments
Is it working just fine in dev mode? |
Yes, it builds and runs fine in dev mode on the simulator |
Hi ! I've got the error and solved it easily : rm -rf $HOME/.nvm/versions/node/* # remove all other versions of node
nvm install node # download the latest version of node If you don't have For my project, RN uses an expired version of node using nvm (v7.7.2). This version doesn't handle the "spread operator". By removing it and installing the latest version of node (still using nvm), RN uses the good version and then the error gone. I hope it'll fix yours. |
Sounds like this may have been addressed by cleaning up node versions. If that's not the case reactivate or open a new issue on latest. |
@chrisglein Hello, I updated node to latest version but it did not worked for me. Still have the spread operator error. Yesterday I opened a new issue here #28848 which is actually the same of this one. Do you have any suggestions about how to fix this issue? 🙏🏻 |
Just tried this again with Node 12.14.1 and it worked |
@johnckendall at the end the problem was that Pods were broken somehow. I removed Pods folder, did the setup and install, and build completed successfully🤷🏻♂️ |
🤔👍🏽 |
The release build fails with:
React Native version:
System:
OS: macOS 10.15.2
CPU: (8) x64 Intel(R) Core(TM) i7-3740QM CPU @ 2.70GHz
Memory: 1.42 GB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.14.1 - /usr/local/bin/node
Yarn: 1.21.1 - ~/dev/clypsy/client/mobile/clypsy/node_modules/.bin/yarn
npm: 6.13.4 - /usr/local/bin/npm
Watchman: 4.3.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
Android SDK:
API Levels: 19, 22, 23, 24, 25, 26, 27, 28
Build Tools: 19.1.0, 20.0.0, 22.0.1, 23.0.1, 23.0.2, 23.0.3, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.0, 26.0.1, 26.0.3, 28.0.0, 28.0.1, 28.0.2, 28.0.3
System Images: a...gle_apis | Google APIs Intel x86 Atom_64 ..., a...gle_apis | Google APIs Intel x86 Atom_64 ..., a...gle_apis | Google APIs Intel x86 Atom_64 ...
IDEs:
Xcode: 11.2.1/11B500 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5
Steps To Reproduce
Describe what you expected to happen:
Project to build and generate an archive
Describe what happened:
Project builds successfully but then the react bundle fails with error noted above.
NOTE: if I run the node bundle command manually on the command line it succeeds
Things tried:
I've tried deleting node_modules, clearing watchman cache and deleting DerivedData
Research seems to suggest that there is a bug in @hapi/joi version 15.0.1 and greater
See: hapijs/joi#1802
This project IS able to be built and run in debug mode.
The text was updated successfully, but these errors were encountered: