I recently upgraded to SDK 49 and I am trying to get an Android build at the moment.
The issue is the build fails with this error
[stderr]
error @react-native/normalize-colors@0.73.1: The engine "node" is incompatible with this module. Expected version ">=18". Got "16.18.1"
13
[stderr]
error Found incompatible module.
14
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
15
Error: Unknown error. See logs of the Install dependencies build phase for more information.
Reading on the web it says I can specify a node version in the eas.json file. This is mine
{
"cli": {
"version": ">= 3.15.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
"node:": "18.16.0",
"channel": "development"
},
"preview": {
"distribution": "internal",
"channel": "preview"
},
"production": {
"channel": "production"
}
},
"submit": {
"production": {}
}
}
However, when I try and build I get the error:
$ eas build -p android --profile development
eas.json is not valid.
- "build.development.node:" is not allowed
Error: build command failed.
error Command failed with exit code 1.
How can I fix this please
Thank you
Erik
Hello,
Same here !
I build my app yesterday with success.
Today I made a fix, and now I got this same error.
No lib updated today.
Thank you for any help
wodin
September 27, 2023, 3:32pm
3
Hi @shoothill
That’s strange. I just tried this now:
"development": {
"developmentClient": true,
"distribution": "internal",
"node": "18.16.0"
},
and it did not complain about the validity of eas.json
. What version of eas
do you have? Maybe try upgrading it? I have this:
$ eas --version
eas-cli/5.3.0 linux-x64 node-v20.6.0
By the way, you can also do it as follows if you want to specify the Node version only once:
{
"cli": {
"version": ">= 3.15.0"
},
"build": {
"base": {
"node": "18.16.0"
},
"development": {
"extends": "base",
"developmentClient": true,
"distribution": "internal",
"channel": "development"
},
"preview": {
"extends": "base",
"distribution": "internal",
"channel": "preview"
},
"production": {
"extends": "base",
"channel": "production"
}
},
"submit": {
"production": {}
}
}
wodin
September 27, 2023, 3:34pm
4
Hi @r.nething
Do you have your lock file (e.g. package-lock.json
or yarn.lock
) in .gitignore
by any chance? It should not be in .gitignore
.
If that’s not it, then I am not sure why you might suddenly be getting this error without upgrading anything.
I ran into this because of react-native-reanimated. Version 2.x throws this error for me. Try expo install react-native-reanimated
Basically the problem is that a library is using an incompatible version of @react-native/normalize-colors
, so it might not be reanimated but that’s a pretty common lib.
You can try to find which lib it is by yarn why @react-native/normalize-colors
or by grepping through your yarn.lock
file.
wodin
September 28, 2023, 5:19am
6
See also Android and iOS build fails: error @react-native/normalize-colors@0.73 - #4 by brents
According to the linked issue they have fixed this in @react-native/normalize-colors
version 0.73.2
1 Like
Thanks for your answer.
I think it is solved now, as we can see it here :
opened 07:28AM - 27 Sep 23 UTC
closed 08:58PM - 27 Sep 23 UTC
Resolution: Fixed
Needs: React Native Team Attention
### Description
```sh
% node --version
v16.20.1
%npx --yes react-native@… 0.72.5 init testcli --template react-native@0.72.5
```
```
...
error @react-native/normalize-colors@0.73.1: The engine "node" is incompatible with this module. Expected version ">=18". Got "16.20.1"
error Found incompatible module.
```
```
% yarn why @react-native/normalize-colors
yarn why v1.22.19
[1/4] 🤔 Why do we have the module "@react-native/normalize-colors"...?
[2/4] đźšš Initialising dependency graph...
[3/4] 🔍 Finding dependency...
[4/4] 🚡 Calculating file sizes...
=> Found "@react-native/normalize-colors@0.72.0"
info Reasons this module exists
- "react-native" depends on it
- Hoisted from "react-native#@react-native#normalize-colors"
info Disk size without dependencies: "24KB"
info Disk size with unique dependencies: "24KB"
info Disk size with transitive dependencies: "24KB"
info Number of shared dependencies: 0
=> Found "deprecated-react-native-prop-types#@react-native/normalize-colors@0.73.1"
info This module exists because "react-native#deprecated-react-native-prop-types" depends on it.
info Disk size without dependencies: "28KB"
info Disk size with unique dependencies: "28KB"
info Disk size with transitive dependencies: "28KB"
info Number of shared dependencies: 0
✨ Done in 0.18s.
```
Looks like the issue was caused by recent publish of `@react-native/normalize-colors@0.73.1`
https://github.com/facebook/react-native/tree/main/packages/normalize-color
### React Native Version
0.72.5
### Output of `npx react-native info`
```
info Fetching system and libraries information...
System:
OS: macOS 13.6
CPU: (12) arm64 Apple M2 Max
Memory: 703.91 MB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 16.20.1
path: ~/.nvm/versions/node/v16.20.1/bin/node
Yarn:
version: 1.22.19
path: ~/.nvm/versions/node/v16.20.1/bin/yarn
npm:
version: 9.7.2
path: ~/.nvm/versions/node/v16.20.1/bin/npm
Watchman:
version: 2023.09.04.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.12.1
path: /Users/boga/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 22.4
- iOS 16.4
- macOS 13.3
- tvOS 16.4
- watchOS 9.4
Android SDK: Not Found
IDEs:
Android Studio: 2022.2 AI-222.4459.24.2221.10121639
Xcode:
version: 14.3.1/14E300c
path: /usr/bin/xcodebuild
Languages:
Java:
version: 15.0.10
path: /usr/bin/javac
Ruby:
version: 2.7.8
path: /Users/boga/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.5
wanted: 0.72.5
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
```
### Steps to reproduce
```
% node --version
v16.20.1
npx --yes react-native@0.72.5 init testcli --template react-native@0.72.5
````
### Snack, screenshot, or link to a repository
See also https://github.com/facebook/react-native/issues/38298
wodin
September 28, 2023, 11:03am
8
Yes, that’s what I meant when I said “According to the linked issue they have fixed this in @react-native/normalize-colors
version 0.73.2”
1 Like
Thanks everyone. All seems to be working ok now.
1 Like
system
Closed
October 28, 2023, 11:31am
10
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.