NodeJS 我有一个无法解决的对等依赖问题

qlfbtfca  于 2023-06-05  发布在  Node.js
关注(0)|答案(1)|浏览(124)

我试图重建一个应用程序,它使用世博会sdk版本45。由于它是不推荐的,我试图升级sdk当我运行npx expo-doctor我得到的输出

✔ Validating global prerequisites versions passed
✔ Checking for incompatible packages passed
✔ Checking for conflicting global packages in project passed
✖ Verifying prebuild support package versions are compatible failed
Issues:
  Expected package expo-modules-autolinking@~1.1.0 || ~1.2.0
  Found invalid:
    expo-modules-autolinking@0.5.5
    (for more info, run: npm why expo-modules-autolinking)
  Expected package @expo/config-plugins@~6.0.0
  Found invalid:
    @expo/config-plugins@4.0.18
    (for more info, run: npm why @expo/config-plugins)
  Expected package @expo/prebuild-config@~6.0.0
  Found invalid:
    @expo/prebuild-config@3.1.6
    (for more info, run: npm why @expo/prebuild-config)
Advice:
  • Upgrade dependencies that are using the invalid package versions.
✔ Checking dependency versions for compatibility with the installed Expo SDK passed
✔ Validating Expo Config passed
✔ Checking package.json for common issues passed

✖ Found one or more possible issues with the project. See above logs for issues and advice to resolve.

当我运行npm为什么expo-modules-autolinking我得到了

expo-modules-autolinking@0.5.5
node_modules/expo-app-loading/node_modules/expo-modules-autolinking
  expo-modules-autolinking@"~0.5.1" from @expo/prebuild-config@3.1.6
  node_modules/expo-app-loading/node_modules/@expo/prebuild-config
    @expo/prebuild-config@"^3.0.15" from expo-splash-screen@0.14.2
    node_modules/expo-app-loading/node_modules/expo-splash-screen
      expo-splash-screen@"~0.14.0" from expo-app-loading@1.3.0
      node_modules/expo-app-loading
        expo-app-loading@"~1.3.0" from the root project

expo-modules-autolinking@1.2.0
node_modules/expo-modules-autolinking
  peer expo-modules-autolinking@">=0.8.1" from @expo/prebuild-config@6.0.1
  node_modules/@expo/prebuild-config
    @expo/prebuild-config@"6.0.1" from @expo/cli@0.7.1
    node_modules/@expo/cli
      @expo/cli@"0.7.1" from expo@48.0.17
      node_modules/expo
        expo@"^48.0.0" from the root project
        peer expo@"*" from expo-splash-screen@0.14.2
        node_modules/expo-app-loading/node_modules/expo-splash-screen
          expo-splash-screen@"~0.14.0" from expo-app-loading@1.3.0
          node_modules/expo-app-loading
            expo-app-loading@"~1.3.0" from the root project
        peer expo@"*" from expo-application@5.1.1
        node_modules/expo-application
          expo-application@"~5.1.1" from expo@48.0.17
          expo-application@"~5.1.0" from expo-notifications@0.18.1
          node_modules/expo-notifications
            expo-notifications@"~0.18.1" from the root project
        peer expo@"*" from expo-constants@14.2.1
        node_modules/expo-constants
          expo-constants@"~14.2.1" from expo@48.0.17
          expo-constants@"~14.2.0" from expo-asset@8.9.1
          node_modules/expo-asset
            expo-asset@"~8.9.1" from the root project
            expo-asset@"~8.9.1" from expo@48.0.17
          expo-constants@"~14.2.0" from expo-auth-session@4.0.3
          node_modules/expo-auth-session
            expo-auth-session@"~4.0.3" from the root project
          expo-constants@"~14.2.0" from expo-linking@4.0.1
          node_modules/expo-linking
            expo-linking@"~4.0.1" from the root project
            expo-linking@"~4.0.0" from expo-auth-session@4.0.3
            node_modules/expo-auth-session
              expo-auth-session@"~4.0.3" from the root project
          expo-constants@"~14.2.0" from expo-notifications@0.18.1
          node_modules/expo-notifications
            expo-notifications@"~0.18.1" from the root project
        peer expo@"*" from expo-crypto@12.2.2
        node_modules/expo-crypto
          expo-crypto@"~12.2.0" from expo-auth-session@4.0.3
          node_modules/expo-auth-session
            expo-auth-session@"~4.0.3" from the root project
        peer expo@"*" from expo-dev-client@2.2.1
        node_modules/expo-dev-client
          expo-dev-client@"~2.2.1" from the root project
        peer expo@"*" from expo-dev-launcher@2.2.1
        node_modules/expo-dev-launcher
          expo-dev-launcher@"2.2.1" from expo-dev-client@2.2.1
          node_modules/expo-dev-client
            expo-dev-client@"~2.2.1" from the root project
        peer expo@"*" from expo-dev-menu@2.2.0
        node_modules/expo-dev-menu
          expo-dev-menu@"2.2.0" from expo-dev-client@2.2.1
          node_modules/expo-dev-client
            expo-dev-client@"~2.2.1" from the root project
          expo-dev-menu@"2.2.0" from expo-dev-launcher@2.2.1
          node_modules/expo-dev-launcher
            expo-dev-launcher@"2.2.1" from expo-dev-client@2.2.1
            node_modules/expo-dev-client
              expo-dev-client@"~2.2.1" from the root project
        peer expo@"*" from expo-dev-menu-interface@1.1.1
        node_modules/expo-dev-menu-interface
          expo-dev-menu-interface@"1.1.1" from expo-dev-client@2.2.1
          node_modules/expo-dev-client
            expo-dev-client@"~2.2.1" from the root project
          expo-dev-menu-interface@"1.1.1" from expo-dev-menu@2.2.0
          node_modules/expo-dev-menu
            expo-dev-menu@"2.2.0" from expo-dev-client@2.2.1
            node_modules/expo-dev-client
              expo-dev-client@"~2.2.1" from the root project
            expo-dev-menu@"2.2.0" from expo-dev-launcher@2.2.1
            node_modules/expo-dev-launcher
              expo-dev-launcher@"2.2.1" from expo-dev-client@2.2.1
              node_modules/expo-dev-client
                expo-dev-client@"~2.2.1" from the root project
        peer expo@"*" from expo-device@5.2.1
        node_modules/expo-device
          expo-device@"~5.2.1" from the root project
        peer expo@"*" from expo-file-system@15.2.2
        node_modules/expo-file-system
          expo-file-system@"~15.2.2" from expo@48.0.17
          expo-file-system@"~15.2.0" from expo-asset@8.9.1
          node_modules/expo-asset
            expo-asset@"~8.9.1" from the root project
            expo-asset@"~8.9.1" from expo@48.0.17
        peer expo@"*" from expo-font@11.1.1
        node_modules/expo-font
          expo-font@"~11.1.1" from the root project
          expo-font@"~11.1.1" from expo@48.0.17
        peer expo@"*" from expo-google-sign-in@10.1.1
        node_modules/expo-google-sign-in
          expo-google-sign-in@"~10.1.0" from the root project
        peer expo@"*" from expo-keep-awake@12.0.1
        node_modules/expo-keep-awake
          expo-keep-awake@"~12.0.1" from expo@48.0.17
        peer expo@"*" from expo-notifications@0.18.1
        node_modules/expo-notifications
          expo-notifications@"~0.18.1" from the root project
        peer expo@"*" from expo-random@13.1.1
        node_modules/expo-random
          expo-random@"~13.1.1" from the root project
        peer expo@"*" from expo-splash-screen@0.18.2
        node_modules/expo-splash-screen
          expo-splash-screen@"~0.18.2" from the root project
        peer expo@"*" from expo-updates@0.16.4
        node_modules/expo-updates
          expo-updates@"~0.16.4" from the root project
        peer expo@"*" from expo-updates-interface@0.9.1
        node_modules/expo-updates-interface
          expo-updates-interface@"~0.9.0" from expo-dev-client@2.2.1
          node_modules/expo-dev-client
            expo-dev-client@"~2.2.1" from the root project
          expo-updates-interface@"~0.9.0" from expo-updates@0.16.4
          node_modules/expo-updates
            expo-updates@"~0.16.4" from the root project
        peer expo@"*" from expo-web-browser@12.1.1
        node_modules/expo-web-browser
          expo-web-browser@"~12.1.0" from expo-auth-session@4.0.3
          node_modules/expo-auth-session
            expo-auth-session@"~4.0.3" from the root project
    @expo/prebuild-config@"6.0.1" from expo-splash-screen@0.18.2
    node_modules/expo-splash-screen
      expo-splash-screen@"~0.18.2" from the root project
  expo-modules-autolinking@"1.2.0" from expo@48.0.17
  node_modules/expo
    expo@"^48.0.0" from the root project
    peer expo@"*" from expo-splash-screen@0.14.2
    node_modules/expo-app-loading/node_modules/expo-splash-screen
      expo-splash-screen@"~0.14.0" from expo-app-loading@1.3.0
      node_modules/expo-app-loading
        expo-app-loading@"~1.3.0" from the root project
    peer expo@"*" from expo-application@5.1.1
    node_modules/expo-application
      expo-application@"~5.1.1" from expo@48.0.17
      expo-application@"~5.1.0" from expo-notifications@0.18.1
      node_modules/expo-notifications
        expo-notifications@"~0.18.1" from the root project
    peer expo@"*" from expo-constants@14.2.1
    node_modules/expo-constants
      expo-constants@"~14.2.1" from expo@48.0.17
      expo-constants@"~14.2.0" from expo-asset@8.9.1
      node_modules/expo-asset
        expo-asset@"~8.9.1" from the root project
        expo-asset@"~8.9.1" from expo@48.0.17
      expo-constants@"~14.2.0" from expo-auth-session@4.0.3
      node_modules/expo-auth-session
        expo-auth-session@"~4.0.3" from the root project
      expo-constants@"~14.2.0" from expo-linking@4.0.1
      node_modules/expo-linking
        expo-linking@"~4.0.1" from the root project
        expo-linking@"~4.0.0" from expo-auth-session@4.0.3
        node_modules/expo-auth-session
          expo-auth-session@"~4.0.3" from the root project
      expo-constants@"~14.2.0" from expo-notifications@0.18.1
      node_modules/expo-notifications
        expo-notifications@"~0.18.1" from the root project
    peer expo@"*" from expo-crypto@12.2.2
    node_modules/expo-crypto
      expo-crypto@"~12.2.0" from expo-auth-session@4.0.3
      node_modules/expo-auth-session
        expo-auth-session@"~4.0.3" from the root project
    peer expo@"*" from expo-dev-client@2.2.1
    node_modules/expo-dev-client
      expo-dev-client@"~2.2.1" from the root project
    peer expo@"*" from expo-dev-launcher@2.2.1
    node_modules/expo-dev-launcher
      expo-dev-launcher@"2.2.1" from expo-dev-client@2.2.1
      node_modules/expo-dev-client
        expo-dev-client@"~2.2.1" from the root project
    peer expo@"*" from expo-dev-menu@2.2.0
    node_modules/expo-dev-menu
      expo-dev-menu@"2.2.0" from expo-dev-client@2.2.1
      node_modules/expo-dev-client
        expo-dev-client@"~2.2.1" from the root project
      expo-dev-menu@"2.2.0" from expo-dev-launcher@2.2.1
      node_modules/expo-dev-launcher
        expo-dev-launcher@"2.2.1" from expo-dev-client@2.2.1
        node_modules/expo-dev-client
          expo-dev-client@"~2.2.1" from the root project
    peer expo@"*" from expo-dev-menu-interface@1.1.1
    node_modules/expo-dev-menu-interface
      expo-dev-menu-interface@"1.1.1" from expo-dev-client@2.2.1
      node_modules/expo-dev-client
        expo-dev-client@"~2.2.1" from the root project
      expo-dev-menu-interface@"1.1.1" from expo-dev-menu@2.2.0
      node_modules/expo-dev-menu
        expo-dev-menu@"2.2.0" from expo-dev-client@2.2.1
        node_modules/expo-dev-client
          expo-dev-client@"~2.2.1" from the root project
        expo-dev-menu@"2.2.0" from expo-dev-launcher@2.2.1
        node_modules/expo-dev-launcher
          expo-dev-launcher@"2.2.1" from expo-dev-client@2.2.1
          node_modules/expo-dev-client
            expo-dev-client@"~2.2.1" from the root project
    peer expo@"*" from expo-device@5.2.1
    node_modules/expo-device
      expo-device@"~5.2.1" from the root project
    peer expo@"*" from expo-file-system@15.2.2
    node_modules/expo-file-system
      expo-file-system@"~15.2.2" from expo@48.0.17
      expo-file-system@"~15.2.0" from expo-asset@8.9.1
      node_modules/expo-asset
        expo-asset@"~8.9.1" from the root project
        expo-asset@"~8.9.1" from expo@48.0.17
    peer expo@"*" from expo-font@11.1.1
    node_modules/expo-font
      expo-font@"~11.1.1" from the root project
      expo-font@"~11.1.1" from expo@48.0.17
    peer expo@"*" from expo-google-sign-in@10.1.1
    node_modules/expo-google-sign-in
      expo-google-sign-in@"~10.1.0" from the root project
    peer expo@"*" from expo-keep-awake@12.0.1
    node_modules/expo-keep-awake
      expo-keep-awake@"~12.0.1" from expo@48.0.17
    peer expo@"*" from expo-notifications@0.18.1
    node_modules/expo-notifications
      expo-notifications@"~0.18.1" from the root project
    peer expo@"*" from expo-random@13.1.1
    node_modules/expo-random
      expo-random@"~13.1.1" from the root project
    peer expo@"*" from expo-splash-screen@0.18.2
    node_modules/expo-splash-screen
      expo-splash-screen@"~0.18.2" from the root project
    peer expo@"*" from expo-updates@0.16.4
    node_modules/expo-updates
      expo-updates@"~0.16.4" from the root project
    peer expo@"*" from expo-updates-interface@0.9.1
    node_modules/expo-updates-interface
      expo-updates-interface@"~0.9.0" from expo-dev-client@2.2.1
      node_modules/expo-dev-client
        expo-dev-client@"~2.2.1" from the root project
      expo-updates-interface@"~0.9.0" from expo-updates@0.16.4
      node_modules/expo-updates
        expo-updates@"~0.16.4" from the root project
    peer expo@"*" from expo-web-browser@12.1.1
    node_modules/expo-web-browser
      expo-web-browser@"~12.1.0" from expo-auth-session@4.0.3
      node_modules/expo-auth-session
        expo-auth-session@"~4.0.3" from the root project

这似乎是一个对等依赖的问题。我试过npm install --legacy-peer-deps,但没有用。

rbl8hiat

rbl8hiat1#

尝试创建.npmrc并插入,然后在其中插入:
legacy-peer-deps=true

相关问题