Home / Function/ throwFileNotFoundInOptimizedDep() — vite Function Reference

throwFileNotFoundInOptimizedDep() — vite Function Reference

Architecture documentation for the throwFileNotFoundInOptimizedDep() function in optimizedDeps.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  5e82bdfe_ad8a_9cc3_2afe_850f2b0c448a["throwFileNotFoundInOptimizedDep()"]
  1ad5c135_fc65_cc8f_2918_6f109d7fd644["optimizedDeps.ts"]
  5e82bdfe_ad8a_9cc3_2afe_850f2b0c448a -->|defined in| 1ad5c135_fc65_cc8f_2918_6f109d7fd644
  daaf9cbf_e2ae_6c47_2a70_91fb6babc950["optimizedDepsPlugin()"]
  daaf9cbf_e2ae_6c47_2a70_91fb6babc950 -->|calls| 5e82bdfe_ad8a_9cc3_2afe_850f2b0c448a
  style 5e82bdfe_ad8a_9cc3_2afe_850f2b0c448a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/node/plugins/optimizedDeps.ts lines 123–133

export function throwFileNotFoundInOptimizedDep(id: string): never {
  const err: any = new Error(
    `The file does not exist at "${id}" which is in the optimize deps directory. ` +
      `The dependency might be incompatible with the dep optimizer. ` +
      `Try adding it to \`optimizeDeps.exclude\`.`,
  )
  err.code = ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR
  // This error will be caught by the transform middleware that will
  // send a 404 status code not found
  throw err
}

Domain

Subdomains

Frequently Asked Questions

What does throwFileNotFoundInOptimizedDep() do?
throwFileNotFoundInOptimizedDep() is a function in the vite codebase, defined in packages/vite/src/node/plugins/optimizedDeps.ts.
Where is throwFileNotFoundInOptimizedDep() defined?
throwFileNotFoundInOptimizedDep() is defined in packages/vite/src/node/plugins/optimizedDeps.ts at line 123.
What calls throwFileNotFoundInOptimizedDep()?
throwFileNotFoundInOptimizedDep() is called by 1 function(s): optimizedDepsPlugin.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free