Miguel bastidas
Miguel bastidas

Reputation: 77

How to fix nodejs Error Cannot find module

Im trying to install my work project app CLI

module.js:550
    throw err;
    ^
Error: Cannot find module '(HERE GOES THE DOCUMENT ROUT)'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3

What should I do???? I don´t know how to solve it? :) thanks!

Upvotes: 1

Views: 26257

Answers (2)

Mahn
Mahn

Reputation: 16605

If the module was installed via npm, but you are still getting this error, make sure that nodejs can find the node_modules dir at either $PATH or $NODE_PATH env vars.

Upvotes: 0

user12602844
user12602844

Reputation:

Share screenshot please, there must be module name, if so the run

npm install "module-name"

in terminal.

Or you should follow these steps:-

  1. Delete node_modules
  2. run npm audit --force in a terminal.
  3. now run npm install in a terminal.

If this works, then good, otherwise you must get the module name and then install it as I wrote earlier.

Upvotes: 3

Related Questions