AltBrian
AltBrian

Reputation: 2572

Cannot find module '../lib/cli' error when running server

I am trying to run build a small express API. The problem is I am having problems trying to get the server up and running. When I type npm start I get the following error.

> nodemon ./index.js --exec babel-node -e js

module.js:557
throw err;
^

Error: Cannot find module '../lib/cli'

The script I have written in the in that package.json is the following.

"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start":"nodemon ./index.js --exec babel-node -e js"
 },

Any help would be appreciated.

Upvotes: 0

Views: 3012

Answers (2)

Harshit
Harshit

Reputation: 1565

There can be some issue with the node_modules. You must check your node_modules installation globally as well as locally inside project directory.

Upvotes: 1

AltBrian
AltBrian

Reputation: 2572

I needed to reinstall the node_modules.

cd your_project_folder
rm -rf node_modules
npm install

Upvotes: 2

Related Questions