0

I am coding a React app in VS code and I had run it multiple times, everything was working great, and when I ran npm start another time, the server crashed and gave me this error. I hadn't changed anything in my code, one minute it was working and then the other not. I've tried deleting node modules, package-lock.json, but nothing works. Does anyone have any idea? I didn't know what snippets of code, if any, I should include, so please tell me.

This is the full error that I get

Error: Cannot find module 'D:..\server\node_modules\sequelize\types\utils' at createEsmNotFoundErr (node:internal/modules/cjs/loader:960:15) at finalizeEsmResolution (node:internal/modules/cjs/loader:953:15) at resolveExports (node:internal/modules/cjs/loader:482:14) at Function.Module._findPath (node:internal/modules/cjs/loader:522:31) at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27) 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. (D:\LanguageCentre\server\routes\Users.js:7:23) at Module._compile (node:internal/modules/cjs/loader:1101:14) { code: 'MODULE_NOT_FOUND', path: 'D:\..\server\node_modules\sequelize\package.json'

4
  • did you require("sequelize/types"); in any file Commented Mar 19, 2022 at 11:13
  • @DreamyPlayer No, I didn't Commented Mar 19, 2022 at 11:56
  • check again all fies for sequelize/types Commented Mar 19, 2022 at 12:04
  • Besides my models, there is not one occurrence of the word 'types' in my server folder. And this is what a model looks like: module.exports = (sequelize, DataTypes) => { const Comments = sequelize.define("Comments", { commentBody: { type: DataTypes.STRING, allowNull: false, }, }); return Comments; }; Commented Mar 19, 2022 at 12:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.