Task tracker tutorial fails to import backend

Hello. FIRST post.
I’ve been trying to work through the Task tracker tutorial where everything was going fairly well until I cloned the backend then was asked to run a realm-cli import in the directory created (…realm-tutorial-backend).

That failed with an erroneous error and I’d have no idea where to go from there? Anybody try that successfully and perhaps have an idea of where to even start?

error:

realm-cli import
open C:\Users<user>\OneDrive.…\GIT\realm-tutorial-backend\environments: The system cannot find the file specified

Might as well try this forum as I’m dead in the water at this point :wink: lol

Thanks in advance
C

Hi Colin!

Welcome to the forum.

It looks like a recent version of realm-cli broke compatibility with our “Set up the Realm App” backend tutorial. The easiest way around this would be to downgrade your local copy of realm-cli to a version that works with the tutorial – in this case, 1.1.0. To do that, run the following command:

npm install -g mongodb-realm-cli@1.1.0

And then proceed through the tutorial after the “install realm-cli” step. We’re working on a fix in the next version of realm-cli, but this should fix the issue for the time being.

2 Likes

I’ll give this a shot. Interesting enough, right after I posted I got past the error as it seems the folder “environments” wasn’t created. So after creating it it went to the NEXT error which was:

realm-cli import
failed to diff app with currently deployed instance: error: error finding cluster “Cluster0”: No cluster named Cluster0 exists in group 5ed7ca2481c1442ab952b7a8

However, I concede and will try the downgrade you’ve suggested. Thanks!!

brb

Looks like I’ve achieved success!!

Much appreciated.

Ultimately it still failed. After I got to the error looking for Cluster0 I ended up gutting my entire workspace in Compass and started a new project as well as a cluster which I called iMoCluster01. Went through the entire process again but still dead trying to find Cluster0. I’m “guessing” if I killed everything again and named my Cluster Cluster0 it might work, but is that the only way? I’m did a “scaling” webinar a couple days ago and it puts me in a “pickle” if I can’t name my own cluster while I work/learn. I’m sure when I’m “ready” for showtime I don’t want my first production cluster called Cluster0. For reference the output was as such:

realm-cli import
this app does not exist yet: would you like to create a new app? [y/n]: y
App name [tasktracker]:
Available Projects:
POS+ - 5ed7ca2481c1442ab952b7a8
Atlas Project Name or ID [POS+]:
Location [US-VA]:
Deployment Model [GLOBAL]:
New app created: tasktracker-oehpk
Creating draft for app…
Draft created successfully…
Importing app…
failed to import app: error: error finding cluster “Cluster0”: No cluster named Cluster0 exists in group 5ed7ca2481c1442ab952b7a8.

You should be able to just change the name of the cluster in the backend app config on this line: https://github.com/mongodb-university/realm-tutorial-backend/blob/final/services/mongodb-atlas/config.json#L5
in the services/mongodb-atlas/config.json file you pulled down during step E. Let me know if that works! The tutorial is definitely written with the intent of you creating a new cluster with the default name, but I believe that’s the only place where the name is referenced in the configuration. Sorry for the confusion!

1 Like

That seems to have worked. Guess my search isn’t as at one point I searched for “Cluster0” but didn’t return that file? hmph. I’m a little stunned by the support I’m receiving. Am I to expect a bill later as this is redic!!

So far so good. I’m plow ahead.
THANK!!
C

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.