Framework Error
Missing required peer dependency 'express' for '@nestjs/core'. You must install 'express' or 'http' to use this module.
What This Error Means
This error occurs when a required peer dependency is missing from the project, preventing the application from running properly. In this case, the '@nestjs/core' module requires either 'express' or 'http' to be installed.
Why It Happens
This error typically happens when a developer sets up a new project with a framework like NestJS, but forgets to install the required peer dependencies. This can happen when using npm or yarn to manage dependencies.
How to Fix It
- 1To fix this error, you need to install the required peer dependency using the following command: npm install express or yarn add express. Alternatively, you can install 'http' using npm install http or yarn add http.
Example Code Solution
const { NestFactory } = require('@nestjs/core');npm install express // or yarn add express
const { NestFactory } = require('@nestjs/core');Fix for Missing required peer dependency 'express' for '@nestjs/core'. You must install 'express' or 'http' to use this module.
Browse Related Clusters
Related JAVASCRIPT Errors
Related JAVASCRIPT Blog Articles
Have a different error? Get an instant explanation.
Explain Another Error