faster-games / whiskey

Data and Events framework for Unity. 🥃⚡
https://whiskey.faster-games.com
GNU General Public License v3.0
3 stars 0 forks source link

Installation failed: An error occurred while resolving packages #1

Open bengreenier opened 2 years ago

bengreenier commented 2 years ago

An error occurred while resolving packages: Package com.faster-games.whiskey@git+https://github.com/faster-games/whiskey.git has invalid dependencies or related test packages: com.faster-games.t4 (dependency): Package [com.faster-games.t4@1.4.1] cannot be found A re-import of the project may be required to fix the issue or a manual modification of G:/src/faster-games/whiskey-example/Packages/manifest.json file.

I am getting this error when installing with git locally

bengreenier commented 2 years ago

This is happening because unity doesn't support scopedRegistry deps in package.json.

The quickest option for fixing this yourself is with:

  "scopedRegistries": [
    {
      "name": "package.openupm.com",
      "url": "https://package.openupm.com",
      "scopes": [
        "com.faster-games.t4",
        "com.openupm"
      ]
    }
  ]

added to Packages\manifest.json after the dependencies section.

See full example mainfest.json ``` { "dependencies": { "com.unity.collab-proxy": "1.5.7", "com.unity.ide.rider": "2.0.7", "com.unity.ide.visualstudio": "2.0.9", "com.unity.ide.vscode": "1.2.3", "com.unity.test-framework": "1.1.27", "com.unity.textmeshpro": "3.0.6", "com.unity.timeline": "1.4.8", "com.unity.ugui": "1.0.0", "com.unity.modules.ai": "1.0.0", "com.unity.modules.androidjni": "1.0.0", "com.unity.modules.animation": "1.0.0", "com.unity.modules.assetbundle": "1.0.0", "com.unity.modules.audio": "1.0.0", "com.unity.modules.cloth": "1.0.0", "com.unity.modules.director": "1.0.0", "com.unity.modules.imageconversion": "1.0.0", "com.unity.modules.imgui": "1.0.0", "com.unity.modules.jsonserialize": "1.0.0", "com.unity.modules.particlesystem": "1.0.0", "com.unity.modules.physics": "1.0.0", "com.unity.modules.physics2d": "1.0.0", "com.unity.modules.screencapture": "1.0.0", "com.unity.modules.terrain": "1.0.0", "com.unity.modules.terrainphysics": "1.0.0", "com.unity.modules.tilemap": "1.0.0", "com.unity.modules.ui": "1.0.0", "com.unity.modules.uielements": "1.0.0", "com.unity.modules.umbra": "1.0.0", "com.unity.modules.unityanalytics": "1.0.0", "com.unity.modules.unitywebrequest": "1.0.0", "com.unity.modules.unitywebrequestassetbundle": "1.0.0", "com.unity.modules.unitywebrequestaudio": "1.0.0", "com.unity.modules.unitywebrequesttexture": "1.0.0", "com.unity.modules.unitywebrequestwww": "1.0.0", "com.unity.modules.vehicles": "1.0.0", "com.unity.modules.video": "1.0.0", "com.unity.modules.vr": "1.0.0", "com.unity.modules.wind": "1.0.0", "com.unity.modules.xr": "1.0.0", "com.faster-games.whiskey": "git+https://github.com/faster-games/whiskey.git" }, "scopedRegistries": [ { "name": "package.openupm.com", "url": "https://package.openupm.com", "scopes": [ "com.faster-games.t4", "com.openupm" ] } ] } ```
bengreenier commented 2 years ago

There are two less-than-ideal paths forward for the project:

bengreenier commented 2 years ago

We should check if openupm install does this for us (e.g. resolves t4 from it's registry as well).

bengreenier commented 2 years ago

openupm does install t4 for us, so the majority of users probably won't get this error at all. However, they may get #4.

As a result, some workaround for t4 as a direct dependency is still needed.