Welcome to Jonic Developer Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

javascript - I keep getting this error 'TypeError: Cannot read property 'prototype' of undefined'

I am creating a sign in page and in my API client class,. I wrote this code that would send a response from the backend to my sign in frontend.

static async signIn(user, pass){
  const response = await axios
    .get('http://localhost:8080/signIn', {
      username: user,
      password: pass,
    })

  return response.data;
}

Immediately after I wrote it though, this error message popped up on my server:

TypeError: Cannot read property 'prototype' of undefined

(anonymous function)
C:/Users/Amman/dunder-mifflin/node_modules/express/lib/response.js:42
  39 |  * @public
  40 |  */
  41 | 
> 42 | var res = Object.create(http.ServerResponse.prototype)
  43 | 
  44 | /**
  45 |  * Module exports.
View compiled

I don't know what caused it or if I typed it wrong, I tried finding ways to fix it but it still gives me the same error. Is there any way I can fix this?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Jonic Developer Community for programmer and developer-Open, Learning and Share
...