Skip to content
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

Expo SDK 49 Node v16 #27

Closed
githubjeka opened this issue Apr 9, 2024 · 4 comments
Closed

Expo SDK 49 Node v16 #27

githubjeka opened this issue Apr 9, 2024 · 4 comments

Comments

@githubjeka
Copy link

I add "@bacons/apple-targets": "*", in package.json

Run eas build --platform ios --profile release and get an error for task Run fastlane

After research Xcode Logs get error:

IntermediateBuildFilesPath/Pods.build/Release-iphoneos/React-rncore.build/Script-46EB2E00022E30.sh
Node found at: /Users/expo/.nvm/versions/node/v16.18.1/bin/node
/Users/expo/workingdir/build/node_modules/cliui/build/index.cjs:291
const stringWidth = require('string-width');
                    ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/expo/workingdir/build/node_modules/string-width/index.js from /Users/expo/workingdir/build/node_modules/cliui/build/index.cjs not supported.
Instead change the require of index.js in /Users/expo/workingdir/build/node_modules/cliui/build/index.cjs to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/Users/expo/workingdir/build/node_modules/cliui/build/index.cjs:291:21)
    at Object.<anonymous> (/Users/expo/workingdir/build/node_modules/yargs/build/index.cjs:1:60678)
    at Object.<anonymous> (/Users/expo/workingdir/build/node_modules/yargs/index.cjs:5:30)
    at Object.<anonymous> (/Users/expo/workingdir/build/node_modules/react-native/scripts/generate-specs-cli.js:12:15) {
  code: 'ERR_REQUIRE_ESM'
}
Command PhaseScriptExecution failed with a nonzero exit code

Any thoughts on how to fix this ?

@wodin
Copy link

wodin commented Apr 9, 2024

Try upgrading to Node 18 or 20.
Also try removing your lock file and node_modules and reinstalling your dependencies. Then run npx expo install --fix

@githubjeka
Copy link
Author

githubjeka commented Apr 10, 2024

Answers from Internet were checked first. Does not help.

@wodin
Copy link

wodin commented Apr 11, 2024

See these:

Maybe add resolutions/overrides for this:
"sucrase": "3.34.0"

@githubjeka
Copy link
Author

Thanks. Fixed.

Added to package.json

  "resolutions": {
    "jackspeak": "2.1.1"
  },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants