javascript - net::ERR_NAME_NOT_RESOLVED axios - Stack Overflow

Hey Everyone I keep getting this error when trying to retrieve data from the server side using Axios. I

Hey Everyone I keep getting this error when trying to retrieve data from the server side using Axios. I have flushed my dns etc... cleared browser data but nothings working any idea? thank you


GET http://locahost:5000/api/activities net::ERR_NAME_NOT_RESOLVED

dispatchXhrRequest  @   xhr.js:184
xhrAdapter  @   xhr.js:13
dispatchRequest @   dispatchRequest.js:52
Promise.then (async)        
request @   Axios.js:61
Axios.<puted>    @   Axios.js:76
wrap    @   bind.js:9
getAllActivities    @   agent.js:19
(anonymous) @   App.js:22
mitHookEffectListMount   @   react-dom.development.js:19731
mitPassiveHookEffects    @   react-dom.development.js:19769
callCallback    @   react-dom.development.js:188
invokeGuardedCallbackDev    @   react-dom.development.js:237
invokeGuardedCallback   @   react-dom.development.js:292
flushPassiveEffectsImpl @   react-dom.development.js:22853
unstable_runWithPriority    @   scheduler.development.js:653
runWithPriority$1   @   react-dom.development.js:11039
flushPassiveEffects @   react-dom.development.js:22820
(anonymous) @   react-dom.development.js:22699
workLoop    @   scheduler.development.js:597
flushWork   @   scheduler.development.js:552
performWorkUntilDeadline    @   scheduler.development.js:164````

Hey Everyone I keep getting this error when trying to retrieve data from the server side using Axios. I have flushed my dns etc... cleared browser data but nothings working any idea? thank you


GET http://locahost:5000/api/activities net::ERR_NAME_NOT_RESOLVED

dispatchXhrRequest  @   xhr.js:184
xhrAdapter  @   xhr.js:13
dispatchRequest @   dispatchRequest.js:52
Promise.then (async)        
request @   Axios.js:61
Axios.<puted>    @   Axios.js:76
wrap    @   bind.js:9
getAllActivities    @   agent.js:19
(anonymous) @   App.js:22
mitHookEffectListMount   @   react-dom.development.js:19731
mitPassiveHookEffects    @   react-dom.development.js:19769
callCallback    @   react-dom.development.js:188
invokeGuardedCallbackDev    @   react-dom.development.js:237
invokeGuardedCallback   @   react-dom.development.js:292
flushPassiveEffectsImpl @   react-dom.development.js:22853
unstable_runWithPriority    @   scheduler.development.js:653
runWithPriority$1   @   react-dom.development.js:11039
flushPassiveEffects @   react-dom.development.js:22820
(anonymous) @   react-dom.development.js:22699
workLoop    @   scheduler.development.js:597
flushWork   @   scheduler.development.js:552
performWorkUntilDeadline    @   scheduler.development.js:164````
Share Improve this question edited Sep 24, 2020 at 13:23 Rowandinho asked Sep 24, 2020 at 13:01 RowandinhoRowandinho 2037 silver badges16 bronze badges 5
  • Have you validated that locahost:5000/api/activities opens via the browser directly or postman and you do no receive any invalid certificates or other interrupts. – Ramakay Commented Sep 24, 2020 at 13:06
  • Do you have https set up in localhost? Does someone is listening for 5000 port on your server? If that is remote server, then he can not access your localhost – Justinas Commented Sep 24, 2020 at 13:06
  • Thanks for replies guys, locahost:5000..... opens via the browser directly without issue – Rowandinho Commented Sep 24, 2020 at 13:24
  • I have solved it...... a stupid typo haha my bad thanks guys anyway – Rowandinho Commented Sep 24, 2020 at 13:31
  • @Justina Could we close this question? – Prathamesh More Commented Sep 24, 2020 at 13:48
Add a ment  | 

1 Answer 1

Reset to default 5

For those who missed - there's typo in locahost. Should be localhost, or locahost should be configured to resolve locally to 127.0.0.1 (or whatever target IP is, depends on OS used)

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742395689a4435894.html

相关推荐

  • javascript - net::ERR_NAME_NOT_RESOLVED axios - Stack Overflow

    Hey Everyone I keep getting this error when trying to retrieve data from the server side using Axios. I

    4小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信