">npm i " is giving error for the "vidly-api-node" folder from "Mastering React" curse

I am trying to add the backend for “vidly”, so I added the “vidly-api-node” folder in the repository. But now, when I change directory to go to the “vidly-api-node” folder and run “npm i”, I am getting errors like
"core-js@2.5.3: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
Then when I do “>npm seed.js”, it gives me the following error:
"Error: Cannot find module ‘mongoose’
Require stack:

  • C:\Users\Hasne\Desktop\unimelb\july_2019\web development(udemy)\html\react\Section 6- Routing_windows\start\vidly-api-node\models\genre.js
  • C:\Users\Hasne\Desktop\unimelb\july_2019\web development(udemy)\html\react\Section 6- Routing_windows\start\vidly-api-node\seed.js
    ←[90m at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)←[39m
    ←[90m at Function.Module._load (node:internal/modules/cjs/loader:778:27)←[39m
    ←[90m at Module.require (node:internal/modules/cjs/loader:1005:19)←[39m
    ←[90m at require (node:internal/modules/cjs/helpers:102:18)←[39m
    at Object. (C:\Users\Hasne\Desktop\unimelb\july_2019\web development(udemy)\html\react\Section 6- Routing_windows\start\vidly-api-node\models\genre.js:2:18)
    ←[90m at Module._compile (node:internal/modules/cjs/loader:1105:14)←[39m
    ←[90m at Object.Module._extensions…js (node:internal/modules/cjs/loader:1159:10)←[39m
    ←[90m at Module.load (node:internal/modules/cjs/loader:981:32)←[39m
    ←[90m at Function.Module._load (node:internal/modules/cjs/loader:822:12)←[39m
    ←[90m at Module.require (node:internal/modules/cjs/loader:1005:19)←[39m {
    code: ←[32m’MODULE_NOT_FOUND’←[39m,
    requireStack: [
    ←[32m’C:\Users\Hasne\Desktop\unimelb\july_2019\web development(udemy)\html\react\Section 6- Routing_windows\start\vidly-api-node\models\genre.js’←[39m,
    ←[32m’C:\Users\Hasne\Desktop\unimelb\july_2019\web development(udemy)\html\react\Section 6- Routing_windows\start\vidly-api-node\seed.js’←[39m
    Can someone help me fix this? Otherwise, I am unable to proceed with the course. Help would be highly appreciated. Thanks,
1 Like

I have the same issue

I’m also having this issue.

@Aloysius - Can you please refresh me what Course lesson section and number this was for. I’ve progressed passed it but if I found a way around this, I may have forgotten to reply.