Rojo error | ClassName for Instance "ReplicatedFirst" was specified in both the project file

[ERROR rojo] ClassName for Instance "ReplicatedFirst" was specified in both the project file (as "ReplicatedFirst") and from the filesystem (as "LocalScript").
        If $className and $path are both set, $path must refer to a Folder.
                             
        Project path: c:\...\default.project.json
        Filesystem path: src/ReplicatedFirst

I’ve decided to use Rojo for my game. I’ve used rbxlx-to-rojo to move it and now I’m getting that error.

project.json
{
  "name": "project",
  "tree": {
    "$className": "DataModel",
    "Chat": {
      "$className": "Chat",
      "$ignoreUnknownInstances": true,
      "$path": "src/Chat"
    },
    "ReplicatedFirst": {
      "$className": "ReplicatedFirst",
      "$ignoreUnknownInstances": true,
      "$path": "src/ReplicatedFirst"
    },
    "ReplicatedStorage": {
      "$className": "ReplicatedStorage",
      "$ignoreUnknownInstances": true,
      "$path": "src/ReplicatedStorage"
    },
    "ServerScriptService": {
      "$className": "ServerScriptService",
      "$ignoreUnknownInstances": true,
      "$path": "src/ServerScriptService"
    },
    "ServerStorage": {
      "$className": "ServerStorage",
      "$ignoreUnknownInstances": true,
      "$path": "src/ServerStorage"
    },
    "StarterGui": {
      "$className": "StarterGui",
      "$ignoreUnknownInstances": true,
      "$path": "src/StarterGui"
    },
    "StarterPack": {
      "$className": "StarterPack",
      "$ignoreUnknownInstances": true,
      "$path": "src/StarterPack"
    },
    "StarterPlayer": {
      "$className": "StarterPlayer",
      "StarterCharacterScripts": {
        "$className": "StarterCharacterScripts",
        "$ignoreUnknownInstances": true,
        "$path": "src/StarterPlayer/StarterCharacterScripts"
      },
      "StarterPlayerScripts": {
        "$className": "StarterPlayerScripts",
        "$ignoreUnknownInstances": true,
        "$path": "src/StarterPlayer/StarterPlayerScripts"
      },
      "$ignoreUnknownInstances": true
    },
    "Workspace": {
      "$className": "Workspace",
      "$ignoreUnknownInstances": true,
      "$path": "src/Workspace"
    }
  }
}

It’s my second time using Rojo.

That error usually happens when, for example, you have a MyScript.client.lua in your src folder, but you also specify what src is. It sounds confusing, but just try to remove "$className": "ReplicatedFirst". It might work, but I never use it for root services like replicated storage. You might need it when you are dealing with subfolder services like Starter Character Scripts and Player Scripts; they will require that you put it there. Here are two examples:


Also, for the record, most of these tools are outdated or unmaintained. As you can see, they were able to do the hard work of manually writing all of that information for you in a file. That’s what you should use them for. Another example is a plugin called “Codify,” which ports your UI into base lua code, Fusion, Roact, or JSX. Again, it is only able to port the base code; the rest is on you.

1 Like

Removing $className for everything helped, thanks.

1 Like

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