Dependency
I just downloaded the project and it reports a missing module. Is the code broken?
I just downloaded the project and it reports a missing module. Is the code broken?
package.jsonRecords which packages are neededsrc/node_modules/Does not exist$ npm start Error: Cannot find module 'react' Dependencies are not installed yetThe list is there but not the packages: install before starting
For a missing module, separate three causes: never installed, version mismatch, or a wrong import path—each reports differently.
The project stores a list, not the packages: The repository usually tracks a manifest and may track a lockfile; the install directory is commonly generated locally rather than committed.
Installing prepares the local dependency directory: The package manager reads the manifest and lockfile, downloads or reuses required packages, and prepares a local install directory. A fresh clone or dependency change usually needs installation as documented by the project.
Errors map to different causes: Cannot find module first suggests dependencies were never installed. If it persists after installing, check the version match and whether the import path is wrong.
The freshly cloned project reports Cannot find module. Run the dependency install command first, confirm every package in the manifest is installed, then start again. If installation fails, explain which package failed and why instead of working around it in business code.