NodeJS EAS引擎节点不兼容

pdkcd3nj  于 2023-04-20  发布在  Node.js
关注(0)|答案(1)|浏览(137)

我试图生成一个apk与EAS本地和它给了我一个错误
根据stack的各种答案,我尝试删除node_modudes,yarn.lock和package.json并运行yarn install,但在过程结束时,它给了我同样的错误:

error expo-cli@5.6.0: The engine "node" is incompatible with this module. Expected version ">=12 <=16". Got "18.14.0"

错误发现不兼容的模块。
在使用yarn install升级后,我尝试使用eas build --local构建apk,它给了我以下错误:

[INSTALL_DEPENDENCIES] warning @unimodules/core@7.2.0: replaced by the 'expo' package, learn more: https://blog.expo.dev/whats-new-in-expo-modules-infrastructure-7a7cdda81ebc
[INSTALL_DEPENDENCIES] warning expo > uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
[INSTALL_DEPENDENCIES] warning expo > expo-constants > uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
[INSTALL_DEPENDENCIES] warning expo > expo-file-system > uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
[INSTALL_DEPENDENCIES] warning expo > fbemitter > fbjs > core-js@1.2.7: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
[INSTALL_DEPENDENCIES] warning expo-cli@5.6.0: No longer supported
[INSTALL_DEPENDENCIES] warning expo-cli > cacache > @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
[INSTALL_DEPENDENCIES] warning expo-cli > @expo/dev-tools > subscriptions-transport-ws@0.9.8: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws    For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md
[INSTALL_DEPENDENCIES] warning expo-cli > @expo/dev-tools > graphql-tools@3.0.0: This package has been deprecated and now it only exports makeExecutableSchema.\nAnd it will no longer receive updates.\nWe recommend you to migrate to scoped packages such as @graphql-tools/schema, @graphql-tools/utils and etc.\nCheck out https://www.graphql-tools.com to learn what package you should use instead
[INSTALL_DEPENDENCIES] warning expo-cli > @expo/dev-tools > graphql-tools > uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
[INSTALL_DEPENDENCIES] warning expo-cli > xdl > webpack-dev-server > chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
[INSTALL_DEPENDENCIES] warning expo-cli > xdl > webpack-dev-server > webpack-log > uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
[INSTALL_DEPENDENCIES] warning expo-cli > xdl > webpack-dev-server > sockjs > uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
[INSTALL_DEPENDENCIES] warning expo-cli > xdl > webpack-dev-server > url > querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
[INSTALL_DEPENDENCIES] warning expo-cli > xdl > webpack-dev-server > chokidar > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
[INSTALL_DEPENDENCIES] warning expo-cli > xdl > webpack > micromatch > snapdragon > source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
[INSTALL_DEPENDENCIES] warning expo-cli > xdl > webpack > watchpack > watchpack-chokidar2 > chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
[INSTALL_DEPENDENCIES] warning expo-cli > xdl > webpack > micromatch > snapdragon > source-map-resolve > source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
[INSTALL_DEPENDENCIES] warning expo-cli > xdl > webpack > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
[INSTALL_DEPENDENCIES] warning expo-cli > xdl > webpack > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
[INSTALL_DEPENDENCIES] warning expo-cli > xdl > @expo/webpack-config > optimize-css-assets-webpack-plugin > cssnano > cssnano-preset-default > postcss-svgo > svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
[INSTALL_DEPENDENCIES] warning expo-cli > xdl > @expo/webpack-config > optimize-css-assets-webpack-plugin > cssnano > cssnano-preset-default > postcss-svgo > svgo > stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
[INSTALL_DEPENDENCIES] warning expo-updates > uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
[INSTALL_DEPENDENCIES] warning react-native > @react-native-community/cli-platform-ios > xcode > uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
[INSTALL_DEPENDENCIES] warning react-native > @react-native-community/cli > metro > jest-haste-map > sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
[INSTALL_DEPENDENCIES] warning react-native > @react-native-community/cli > metro > metro-minify-uglify > uglify-es@3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
[INSTALL_DEPENDENCIES] [2/4] Fetching packages...
[INSTALL_DEPENDENCIES] error expo-cli@5.6.0: The engine "node" is incompatible with this module. Expected version ">=12 <=16". Got "18.14.0"
[INSTALL_DEPENDENCIES] error Found incompatible module.
[INSTALL_DEPENDENCIES] info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[INSTALL_DEPENDENCIES] 
Error: yarn exited with non-zero code: 1
    at ChildProcess.completionListener (/private/var/root/.npm/_npx/86c1f166462562ca/node_modules/@expo/spawn-async/build/spawnAsync.js:41:23)
    at Object.onceWrapper (node:events:628:26)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1091:16)
    at Socket.<anonymous> (node:internal/child_process:449:11)
    at Socket.emit (node:events:513:28)
    at Pipe.<anonymous> (node:net:322:12)
    ...
    at spawnAsync (/private/var/root/.npm/_npx/86c1f166462562ca/node_modules/@expo/spawn-async/build/spawnAsync.js:7:23)
    at spawn (/private/var/root/.npm/_npx/86c1f166462562ca/node_modules/@expo/turtle-spawn/dist/index.js:17:47)
    at installDependencies (/private/var/root/.npm/_npx/86c1f166462562ca/node_modules/@expo/build-tools/dist/utils/project.js:107:38)
    at async /private/var/root/.npm/_npx/86c1f166462562ca/node_modules/@expo/build-tools/dist/utils/project.js:39:9
    at async BuildContext.runBuildPhase (/private/var/root/.npm/_npx/86c1f166462562ca/node_modules/@expo/build-tools/dist/context.js:72:28)
    at async setup (/private/var/root/.npm/_npx/86c1f166462562ca/node_modules/@expo/build-tools/dist/utils/project.js:38:5)
    at async buildAsync (/private/var/root/.npm/_npx/86c1f166462562ca/node_modules/@expo/build-tools/dist/builders/android.js:19:5)
    at async runBuilderWithHooksAsync (/private/var/root/.npm/_npx/86c1f166462562ca/node_modules/@expo/build-tools/dist/builders/common.js:13:13)
    at async Object.androidBuilder (/private/var/root/.npm/_npx/86c1f166462562ca/node_modules/@expo/build-tools/dist/builders/android.js:15:12)
    at async buildAndroidAsync (/private/var/root/.npm/_npx/86c1f166462562ca/node_modules/eas-cli-local-build-plugin/dist/android.js:62:12)

Build failed
Unknown error. See logs for more information.
    Error: npx exited with non-zero code: 1

如何修复此错误以生成apk?谢谢。

fzwojiic

fzwojiic1#

我有同样的问题这个命令解决了这个问题,发现它
The engine "node" is incompatible with this module

$ yarn install --ignore-engines

相关问题