remix-run/remix · warning · TypeError
Could not resolve dependency "${dependencyName}" from ${pack
Error message
Could not resolve dependency "${dependencyName}" from ${packageJsonPath}. What it means
Nested help variant: `remix help <command> <subtopic...>` where the command exists but the remaining argv matches nothing under it. `getNestedHelpText` throws unconditionally for unmatched nested input, prefixing the command name so you can see which level failed.
Source
Thrown at packages/assets/src/lib/access.ts:222
}
while (allowQueue.length > 0) {
let { packageJsonPath, packageName } = allowQueue.shift()!
let packageRootPath = normalizeFilePath(path.dirname(packageJsonPath))
if (seenAllowedPackageRoots.has(packageRootPath)) continue
seenAllowedPackageRoots.add(packageRootPath)
let packageJson = readPackageJson(packageJsonPath)
allowPackageRootPaths.set(packageRootPath, packageName)
for (let dependencyName of Object.keys(packageJson.dependencies ?? {})) {
validatePackageName(
dependencyName,
`Dependency "${dependencyName}" from ${packageJsonPath} must be a package name.`,
)
let dependencyPackageJsonPath = findPackageJsonPath(dependencyName, packageRootPath)
if (dependencyPackageJsonPath === null) {
throw new TypeError(
`Could not resolve dependency "${dependencyName}" from ${packageJsonPath}.`,
)
}
allowQueue.push({
packageJsonPath: dependencyPackageJsonPath,
packageName: dependencyName,
})
}
for (let dependencyName of Object.keys(packageJson.optionalDependencies ?? {})) {
validatePackageName(
dependencyName,
`Optional dependency "${dependencyName}" from ${packageJsonPath} must be a package name.`,
)
let dependencyPackageJsonPath = findPackageJsonPath(dependencyName, packageRootPath)
if (dependencyPackageJsonPath !== null) {
allowQueue.push({
packageJsonPath: dependencyPackageJsonPath,
packageName: dependencyName,View on GitHub (pinned to 9696913134)
Solutions
- Run `remix help <command>` with no subtopic to see usage and valid subcommands
- Correct the subtopic name
- Consult the top-level `remix help` listing
Example fix
# before remix help db migratez # after remix help db migrate
Defensive patterns
Strategy: type-guard
Validate before calling
let usage = execSync(`remix help ${command}`, { encoding: 'utf8' });
if (!usage.includes(subtopic)) console.error('Unknown subtopic'); Type guard
function isKnownSubtopic(sub: string, usageText: string): boolean {
return usageText.includes(sub);
} Try / catch
Catch RMX_UNKNOWN_HELP_TOPIC and retry with just `remix help <command>`.
Prevention
- Query command-level help before drilling into subtopics
- Copy subcommand names from usage text
When it happens
Trigger: Calling help with extra args beyond a valid command, e.g. `remix help db migratez`, where the first token resolves to a command but nested resolution hits `getNestedHelpText`.
Common situations: Exploring subcommands with typos; assuming a subcommand exists (`remix help routes json`); renamed subcommands across versions.
Related errors
- Could not resolve allowed package "${packageName}".
- Unknown database command: ' + command
- throw new AssertionError(options)
- ${matcherName} requires a mock function with a .mock.calls p
- throw new AssertionError({ message, actual, expected, operat
AI-assisted analysis of remix-run/remix@9696913134 (2026-08-27).
Data as JSON: /api/errors/ce8e95a356d88b0b.
Report an issue: GitHub.