-
Notifications
You must be signed in to change notification settings - Fork 25k
Description
Description
v 0.68.2 accepts our react-native.config.js which is as follows:
module.exports = {
project: {
ios: {},
android: {
mainFilePath: 'src/main/java/com/myantskiin/MainApplication.kt'
}
},
assets: ['./src/assets/fonts/'],
dependencies: {
},
}
However, v 0.69 throws the following error:
error Failed to load configuration of your project. Config Validation Error: "project.android.mainFilePath" is not allowed at readConfigFromDisk (/Users/distiller/.nvm/versions/node/v14.19.3/lib/node_modules/react-native/node_modules/@react-native-community/cli-config/build/readConfigFromDisk.js:48:11) at loadConfig (/Users/distiller/.nvm/versions/node/v14.19.3/lib/node_modules/react-native/node_modules/@react-native-community/cli-config/build/loadConfig.js:69:65) at setupAndRun (/Users/distiller/.nvm/versions/node/v14.19.3/lib/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js:250:45) at Object.run (/Users/distiller/.nvm/versions/node/v14.19.3/lib/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js:212:11) at Object.<anonymous> (/Users/distiller/.nvm/versions/node/v14.19.3/lib/node_modules/react-native/cli.js:16:7) at Module._compile (internal/modules/cjs/loader.js:1085:14) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10) at Module.load (internal/modules/cjs/loader.js:950:32) at Function.Module._load (internal/modules/cjs/loader.js:790:12) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12) info Run CLI with --verbose flag for more details.
Version
0.69.0
Output of npx react-native info
error Failed to load configuration of your project.
Config Validation Error: "project.android.mainFilePath" is not allowed
at readConfigFromDisk (/Users/distiller/.nvm/versions/node/v14.19.3/lib/node_modules/react-native/node_modules/@react-native-community/cli-config/build/readConfigFromDisk.js:48:11)
at loadConfig (/Users/distiller/.nvm/versions/node/v14.19.3/lib/node_modules/react-native/node_modules/@react-native-community/cli-config/build/loadConfig.js:69:65)
at setupAndRun (/Users/distiller/.nvm/versions/node/v14.19.3/lib/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js:250:45)
at Object.run (/Users/distiller/.nvm/versions/node/v14.19.3/lib/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js:212:11)
at Object. (/Users/distiller/.nvm/versions/node/v14.19.3/lib/node_modules/react-native/cli.js:16:7)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)
info Run CLI with --verbose flag for more details.
Steps to reproduce
Just use the react-native.config.js with mainFilePath and it does not accept it as a valid configuration.
Snack, code example, screenshot, or link to a repository
module.exports = {
project: {
ios: {},
android: {
mainFilePath: 'src/main/java/com/myantskiin/MainApplication.kt'
}
},
assets: ['./src/assets/fonts/'],
dependencies: {
},
}