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

eas build --non-interactive requires (certain) interactions #643

Closed
bensig opened this issue Sep 24, 2021 · 1 comment · Fixed by #644
Closed

eas build --non-interactive requires (certain) interactions #643

bensig opened this issue Sep 24, 2021 · 1 comment · Fixed by #644
Assignees
Labels
bug Something isn't working

Comments

@bensig
Copy link

bensig commented Sep 24, 2021

Summary

When we run eas build --platform android --non-interactive - we still get an error about the metro.config.js that should be bypassed without a prompt. This has not been a problem when we run the build locally, but now that we are trying to automate the builds, it is becoming an blocker.

Environment

EAS CLI 0.28.2 environment info:
System:
OS: macOS 11.4
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.9.1 - /opt/homebrew/bin/node
Yarn: 1.22.10 - /opt/homebrew/bin/yarn
npm: 7.21.1 - /opt/homebrew/bin/npm
Utilities:
Git: 2.31.1 - /opt/homebrew/bin/git
npmPackages:
expo: ~41.0.1 => 41.0.1
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz => 0.63.2
react-native-web: ~0.13.12 => 0.13.18
npmGlobalPackages:
eas-cli: 0.28.2
expo-cli: 4.11.0

Error output

➜  bitcoin-libre git:(fix/metro-bundler) eas build --platform android --non-interactive --skip-project-configuration
✔ Linked to project @name/name (​https://expo.dev/accounts/name/projects/name​)
It looks like that you are using a custom metro.config.js that does not extend @expo/metro-config.
This can result in unexpected and hard to debug issues, like missing assets in the production bundle.
We recommend you to abort, fix the metro.config.js, and try again.
Learn more on customizing Metro: https://docs.expo.dev/guides/customizing-metro/

Reproducible demo or steps to reproduce from a blank project

We have tried to use the following metro.config.js - project builds fine with either, but both cause the error to appear even with --non-interactive specified on the eas build command:

module.exports = {
  transformer: {
    getTransformOptions: async () => ({
      transform: {
        experimentalImportSupport: false,
        inlineRequires: false,
      },
    }),
  },
  resolver: {
    sourceExts: ['jsx', 'js', 'ts', 'tsx'], //add here
  },
};
const {sourceExts} = require('metro-config/src/defaults/defaults');
const {getDefaultConfig, mergeConfig} = require('metro-config');

const cfg = async () => await getDefaultConfig();

module.exports = mergeConfig(cfg, {
  transformer: {
    getTransformOptions: async () => ({
      transform: {
        experimentalImportSupport: false,
        inlineRequires: false,
      },
    }),
  },
  resolver: {
    sourceExts: [...sourceExts, 'jsx', 'js', 'ts', 'tsx'],
  },
});
@bensig bensig added the bug Something isn't working label Sep 24, 2021
@bensig bensig changed the title eas build shows a metro.config.js error - but the build works correctly when skipped eas build --non-interactive requires interactions Sep 24, 2021
@bensig bensig changed the title eas build --non-interactive requires interactions eas build --non-interactive requires (certain) interactions Sep 24, 2021
@dsokal dsokal self-assigned this Sep 24, 2021
@bensig
Copy link
Author

bensig commented Sep 24, 2021

Woah, that was fast! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants