Last modified: Jun 28, 2026
Fix Cannot Find Module 'concurrently'
Are you seeing the error "Cannot find module 'concurrently'" in your Node.js project? This is a common issue when using concurrently to run multiple scripts at once. Don't worry. This guide will help you fix it fast.
We will cover the main causes, step-by-step solutions, and how to prevent this error in the future. Each section uses short paragraphs and clear code examples for beginners.
What Does This Error Mean?
The error means Node.js cannot locate the concurrently package in your project's node_modules folder. This usually happens when the package is missing, not installed, or installed globally instead of locally.
Here is a typical error message you might see in your terminal:
Error: Cannot find module 'concurrently'
Require stack:
- /home/user/project/package.json
This stops your scripts from running. Let's fix it now.
Common Causes
There are a few main reasons for this error:
- Package not installed – You forgot to run
npm install concurrently. - Wrong installation location – The package is installed globally but your project expects it locally.
- Corrupted node_modules – The folder may be damaged or incomplete.
- Missing package.json – Your project lacks a proper
package.jsonfile.
Now, let's go through the solutions step by step.
Solution 1: Install the Package Locally
The most common fix is to install concurrently as a local dependency. Open your terminal in the project root and run:
npm install concurrently --save-dev
This adds concurrently to your package.json under devDependencies. If you need it for production scripts, use --save instead.
After installation, check your package.json file. It should include something like this:
{
"devDependencies": {
"concurrently": "^8.2.2"
}
}
Now try running your script again. The error should be gone.
Solution 2: Reinstall node_modules
If the package is already listed in package.json but the error persists, your node_modules folder may be corrupted. Delete it and reinstall all dependencies.
Run these commands:
rm -rf node_modules
npm install
This cleans the folder and reinstalls everything from scratch. It often fixes hidden issues.
Solution 3: Check Global vs Local Installation
Sometimes developers install concurrently globally with npm install -g concurrently. While this works for command-line use, your project scripts may not find it. Always prefer a local installation for project-specific tools.
To check if you have a global version, run:
npm list -g concurrently
If it is installed globally, you can still use it, but for consistency, install it locally as shown in Solution 1.
Solution 4: Verify package.json Syntax
A missing or malformed package.json can cause this error. Ensure your file exists and has proper JSON syntax. A minimal example:
{
"name": "my-project",
"version": "1.0.0",
"scripts": {
"start": "concurrently \"npm run server\" \"npm run client\""
},
"devDependencies": {
"concurrently": "^8.2.2"
}
}
If you do not have a package.json, create one with npm init -y and then install concurrently.
Solution 5: Use a Clean Cache
A corrupted npm cache can also cause module errors. Clear the cache and retry:
npm cache clean --force
npm install concurrently --save-dev
This removes any broken cached data and forces a fresh download.
Example: Running Scripts with concurrently
Once the error is fixed, you can use concurrently to run multiple commands. Here is a simple example:
{
"scripts": {
"server": "node server.js",
"client": "node client.js",
"dev": "concurrently \"npm run server\" \"npm run client\""
}
}
Now run npm run dev in your terminal. You should see both processes start together:
[server] Server running on port 3000
[client] Client running on port 4000
This is a clean and efficient way to manage multiple tasks.
How to Prevent This Error in the Future
Follow these best practices to avoid the "Cannot find module" error again:
- Always install packages locally with
--save-devor--save. - Commit your
package.jsonandpackage-lock.jsonto version control. - Run
npm installafter cloning a repository. - Use
npx concurrentlyinstead ofconcurrentlyif you are unsure about installation.
If you encounter similar issues with other modules, check out our guide on Fix Node.js Error: Cannot find module for more detailed troubleshooting.
Conclusion
The "Cannot find module 'concurrently'" error is easy to fix. The main solution is to install the package locally with npm install concurrently --save-dev. If that does not work, reinstall your node_modules folder or clear the npm cache. Always keep your package.json file up to date.
By following the steps in this article, you can get your scripts running smoothly again. Remember to use local installations for all project dependencies. This keeps your environment consistent and avoids similar errors in the future.