eject built in xcode resulted in "SyntaxError: Use of const in strict mode."
See original GitHub issueDescription
Created app using crna cli, yarn eject using expo sdk, open xcode using ios project workspace, in xcode clean run build, resulted in JavaScript “SyntaxError: Use of const in strict mode.” with chalk module
Expected Behavior
Expected to build with xcode successfully for yarn eject code
What action did you perform, and what did you expect to happen?
creact-react-native app yarn eject, follow eject instruction and select the expo sdk one go into ios folder, pod install open ios project with xcode in xcode, run clean and build
Observed Behavior
What actually happened when you performed the above actions?
SyntaxError: Use of const in strict mode.
If there’s an error message, please paste the full terminal output and error message in this code block:
.nvm/versions/node/v7.10.1//lib/node_modules/exp/node_modules/chalk/index.js:2
const escapeStringRegexp = require('escape-string-regexp');
^^^^^
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
Environment
Please run these commands in the project folder and fill in their results:
npm ls react-native-scripts
: react-native-scripts@1.11.1npm ls react-native
: react-native@0.52.0npm ls expo
: expo@25.0.0node -v
: v7.10.1npm -v
: 4.2.0yarn --version
: 1.5.1watchman version
: 4.7.0
Also specify:
- Operating system: osx sierra 10.12.6
- Phone/emulator/simulator & version: xcode 9.2
Reproducible Demo
- creact-react-native app
- yarn eject, follow eject instruction and select the expo sdk one
- go into ios folder, pod install
- open ios project with xcode
- in xcode, run clean and build
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
Seeing this issue as well in latest versions of CRNA & Expo/ExpoKit, even using Node 10.6.0. Node version doesn’t seem to be a factor here oddly enough.
Will continue to dig in more and report back if I’m able to find anything useful.
you can update node version as well to resolve this problem