Couldn't find any versions for "@inductiveautomation/perspective-drawing-common" that matches "2.1.99"

Hi,

I cloned the ignition-sdk-example and build the perspective-component example and everything worked fine. I then created my own module that attempt to register a simple perspective component. What i did is pretty much copied the structure of the perspective-compoennt example from here.

I'm unable to run ./gradlew :web:build at the moment and it comes back with the following error error Couldn't find any versions for "@inductiveautomation/perspective-drawing-common" that matches "2.1.99"

In my package.json I have the followign which matches with the example

    "@inductiveautomation/perspective-client": "^2.1.16",
    "@inductiveautomation/perspective-designer": "^2.1.16",

In the build.gradle.kts of /web folder I have node versions as follows

node {
    version.set("18.17.1") // Update this to at least 18.x.x (can be higher, e.g., 20.0.0)
    yarnVersion.set("1.22.22") // Yarn version stays the same
    npmVersion.set("9.8.1") // Optional but can be upgraded
    download.set(true)
    nodeProjectDir.set(file(project.projectDir))
}

I also have the .npmrc file

; register the @inductiveautomation scope so that IA node packages resolve from our
; package repo and it doesn't attempt to resolve them against the npm's central repo
@inductiveautomation:registry=https://nexus.inductiveautomation.com/repository/node-packages/

and yarnrc file

"@inductiveautomation:registry" "https://nexus.inductiveautomation.com/repository/node-packages"

Here's the folder hierarchy of the web folder

Any idea how to resolve the erros?

I’ve been running into this same issue lately, it has to do with how dependencies are included in @inductiveautomation/perspective-designer.

Versions 2.1.99 seem to exist for most of the IA packages, meaning if you don’t specify a specific version the package manager will interpret 2.1.99 as the most recent available version and try to grab it.

Things that I’ve done to get around this:

  1. Listing a specific version for all IA packages (i.e. 2.1.16 instead of ^2.1.16)
  2. List the peer dependency @inductiveautomation/perspective-drawing-common in your own package.json (again using a specific version).
  3. Use yarn? I don’t have a good understanding yet, but yarn seems to do a better job of resolving IA’s packages, especially the older versions incorrectly published with workspace:* dependencies listed.

From my working package.json (note: working using yarn, because npm was giving me issues):

"dependencies": {
    "@inductiveautomation/perspective-client": "2.1.33",
    "@inductiveautomation/perspective-components": "2.1.33",
    "@inductiveautomation/perspective-designer": "2.1.33",
    "@inductiveautomation/perspective-drawing-common": "2.1.33",
    …
}

Listing specific version for IA package worked for me.

Thank you

1 Like