Unknown ElementKind "nil" Error

Hello,

I am having trouble understanding this error:
00:31:03.524 - ServerScriptService.EagleVisionStudio.Libraries.Roact.createReconciler:346: Unknown ElementKind “nil”

I go to the source, (which for once isn’t a script I made) and it is within the createReconciler module. I am not seeing where a ‘nil’ would be for the if block It returns nil; or maybe I am misunderstanding this error?

1 Like

This is probably some kind of library you have acquired. The script(s) might have implemented custom errors which we cannot identify at first glance.

WIth that, I will go redownload the github file and see if it comes up, again.

Most likely you are using the module in a different way than intended. I recommend checking out the documentation and make sure you are using is correctly. Again, without your code we can not help.

Here’s the createRecounciler module:

		if kind == ElementKind.Host then
			renderer.mountHostNode(reconciler, virtualNode)
		elseif kind == ElementKind.Function then
			mountFunctionVirtualNode(virtualNode)
		elseif kind == ElementKind.Stateful then
			element.component:__mount(reconciler, virtualNode)
		elseif kind == ElementKind.Portal then
			mountPortalVirtualNode(virtualNode)
		else
		This is the source of the error->	error(("Unknown ElementKind %q"):format(tostring(kind), 2))
		end

		return virtualNode
	end

Output:
15:48:49.683 - ServerScriptService.EagleVisionStudio.Libraries.Roact.createReconciler:321: Unknown ElementKind “nil”

15:48:49.684 - Stack Begin

15:48:49.685 - Script ‘ServerScriptService.EagleVisionStudio.Libraries.Roact.createReconciler’, Line 321 - upvalue mountVirtualNode

15:48:49.685 - Script ‘ServerScriptService.EagleVisionStudio.Libraries.Roact.createReconciler’, Line 88 - upvalue updateChildren

15:48:49.686 - Script ‘ServerScriptService.EagleVisionStudio.Libraries.Roact.createReconciler’, Line 100 - field updateVirtualNodeWithChildren

15:48:49.686 - Script ‘ServerScriptService.EagleVisionStudio.Libraries.Roact.RobloxRenderer’, Line 215 - field mountHostNode

15:48:49.687 - Script ‘ServerScriptService.EagleVisionStudio.Libraries.Roact.createReconciler’, Line 313 - upvalue mountVirtualNode

15:48:49.687 - Script ‘ServerScriptService.EagleVisionStudio.Libraries.Roact.createReconciler’, Line 351 - field mount

15:48:49.688 - Script ‘ServerScriptService.EagleVisionStudio’, Line 16

15:48:49.688 - Stack End

Can we have the code which requires the library? It appears you are not passing a ElementType, which is required.

From a glance, it should be

  • Host
  • Function
  • Stateful
  • Portal

Please read module’s APIs before trying to use them, thanks.

I did.

I haven’t used the reconciler itself.

Here:

local CoreGui = game:GetService("CoreGui")

local Roact = require(game.ServerScriptService.EagleVisionStudio.Libraries.Roact)
local RoactRodux = require(game.ServerScriptService.EagleVisionStudio.Libraries.RoactRodux)
local Rodux = require(game.ServerScriptService.EagleVisionStudio.Libraries.Rodux)

local Toolbox = require(game.ServerScriptService.EagleVisionStudio.Toolbox)
local Properties = require(game.ServerScriptService.EagleVisionStudio.Properties)

local EagleVisionStudio = Roact.createElement("ScreenGui", {
			--EagleVisionStudio.Name = "EagleVisionStudio"
	}, {
		Toolbox, Properties,
	})
		
local EagleVisionStudio_Handle = Roact.mount(EagleVisionStudio, game.CoreGui)

For the Toolbox and Properties, I was going to define their UI within their own module script.