1

I tried running this function "node server/index.js" to locally view the app, it gave me the following error. Why are my having the error statements Error: Cannot find module 'typeorm'

The bellow shows all the error message

node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'typeorm'
Require stack:
- C:\Users\olani\Desktop\TouristWebscraping\server\db.js
- C:\Users\olani\Desktop\TouristWebscraping\server\index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (C:\Users\olani\Desktop\TouristWebscraping\server\db.js:3:17)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\olani\\Desktop\\TouristWebscraping\\server\\db.js',
    'C:\\Users\\olani\\Desktop\\TouristWebscraping\\server\\index.js'
  ]
}
Ayorinde
  • 21
  • 3
  • Did you try npm install ? The error is quite explicit here: "cannot find module typeorm". If it's not inside your package.json, install it. If it is it means that you didn't npm i before launching your project – Nicolas Menettrier Jul 25 '22 at 14:59
  • https://stackoverflow.com/help/how-to-ask <= check this also, your question is not explicit (if we just look at the title, we can't understand what's your problem) – Nicolas Menettrier Jul 25 '22 at 15:01

0 Answers0