[nodemon] restarting due to changes...
[nodemon] starting `node ./src/app.js`
[nodemon] restarting due to changes...
[nodemon] starting `node ./src/app.js`
Server is up on port 3000
/Users/xyz/Node-Course/web-app/src/utils/geocode.js:18
latitude: body.features[0].center[1],
^
TypeError: Cannot read property '0' of undefined我无法调试此错误发生在我尝试使用mapbox.com使用回调和解构来获取某个位置的地理代码纬度和经度时。
发布于 2020-06-13 22:29:40
已解决。
在从API.If获取json数据时,代码中的API access token发生了修改,您面临的错误与尝试验证代码中的access token类似。
https://stackoverflow.com/questions/62331006
复制相似问题