Directus - Installing the exact version still installs the latest version

Viewed 350

I am trying to replicate the cloud server's Directus version, which is 9.0.0-rc.53, on my local machine. I've followed the standard procedure of creating the project a using the following command:

npx create-directus-project project-name

I followed the approach from the Directus Docs to downgrade the server doing the following command:

npm install directus@9.0.0-rc.53

However, after doing so, the Directus server still remains the on the latest version, 9.0.0-rc.75. I've tried doing the following:

  1. Removing the caret in package.json (Changing ^9.0.0-rc.53 to 9.0.0-rc.53)
  2. Removing the caret from all Directus-related dependencies in package-lock.json
  3. Deleting node_modules and running npm install again after doing 1 and 2.

Despite this, I see that the Directus-related packages being used in the node_modules folder is still the latest version, 9.0.0-rc.75.

The reason why I need this specific version is that there is a breaking change in GraphQL specifically where the GraphQL schema is different from these two versions.

Upgrading the Cloud's server is currently not an option as GraphQL queries that are in place will no longer work.

How am I to go about installing a specific version of Directus?

Thanks in advance.

1 Answers

The tag in GitHub repository is v9.0.0-rc.53. So try to install as

npm install directus@v9.0.0-rc.53

This worked for me. For some reason npm may not be recognizing you put the wrong version, so it installs the last one.

Related