1

Edit: Just created a brand new project, (npx react-native-init), still the same exact issue. No clue what's happening, never had this issue before.

App is building / running file locally. It's only when I archive this issue pops up.

Tried:

  • Deleting pod file / workspace
  • Checking 'For install builds only'
  • Disable / Enable the 'login' in 'Keychain Access'
  • Cleaning and restarting computer
  • Archiving in debug and release

Node: 14.16.1 / RN: 0.64.0 / Typescript

What else should I do? Really stuck here. It doesn't make sense it builds fine locally but not in Archive. Thank you.

SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:617:28)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/andrewyoung/tacapp/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/doctor/doctor.js:28:21)
Command PhaseScriptExecution failed with a nonzero exit code
1
  • @BurakAkkaş Yes, this is default what I tried. I just wanted to add that archiving in debug mode also doesn't work. Commented Apr 12, 2021 at 14:37

1 Answer 1

2

Got it - Per this article I used: nvm unalias default and my app is now running.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks. I made it work by doing this: brew install nvm and then nvm unalias default And then build again for my device
I fixed it by using the command nvm alias default v16.18.0 (You can check the versions with 'nvm ls' and choose one)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.