TypeError: Cannot read property 'prototype' of undefined React Express
While im working with one file, this error suddenly appears. I was then checked the top line and this import e from 'express'
line appears without knowing why. I just removed it, and it works.
import response from { 'express' }; got imported in your actions page by default by "vs code"
I found the I have mistakenly typed
import response from { 'express' }
I found that this problem happens when you try to call backEnd stuff in your frontEnd. when I delete that line problem solved.
Edit: it turns out that I didn't type the import statement because I used the word response
as a variable name, it was automatically imported.
I'm not sure if the import was from React itself or another VS code auto-completion extension.
import { json } from "express"
this might be auto imported by vs code or by react so just delete this.