Questions
heshaniheshaniasked 4 months ago
how to fix this problem,
ReferenceError: mongoose is not defined
    at Object. (C:\Users\Erik\3D Objects\siam 2022\siam_voice\server.js:1:1)      
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)       
    at internal/main/run_main_module.js:17:47
1

1 Answers

Accepted
codegenlabcodegenlabanswered 4 months ago
run this command in terminal,
npm install mongoose --save
and import mongoose,
const mongoose = require('mongoose');
1