Error: "Unknown require: unsupported path"

In my strict module script, I write:

for _, skillName in ipairs(config.skills) do
	local skillClass = require(ReplicatedStorage.Skills:FindFirstChild(skillName, true))
	local skillConfig = SkillConfig[skillName]
	local skillObject =, skillConfig)
	table.insert(self.skills, skillObject)

And I get the error Unknown require: unsupported path at require(ReplicatedStorage.Skills:FindFirstChild(skillName, true)) despite it working properly and giving me the correct result every time.

Here is what the actual files (inside of the ReplicatedStorage) look like:


It doesn’t impede my game, but can this error be removed?

That’s the linter’s issue (or the code style-checker’s issue). It just means the linter doesn’t know how to access the module you require.

Even if you’re sure the skillName module exists, FindFirstChild is always understood by the linter as returning an Instance-based object or nil.

This shouldn’t affect your game, although I’d be more inclined to somehow explicitly (or directly) require those modules.