Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slice issue #4

Open
Shikha0321 opened this issue Nov 8, 2022 · 4 comments
Open

slice issue #4

Shikha0321 opened this issue Nov 8, 2022 · 4 comments

Comments

@Shikha0321
Copy link

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'slice')
at formatForecastWeather (weatherService.js:48:1)
at async getFormattedWeatherData (weatherService.js:75:1)
at async fetchWeather (App.js:23:1)

@Siddhesh1123
Copy link

Siddhesh1123 commented Jan 28, 2023

same issue
if you know the solution please let me know

@hmongdev
Copy link

hmongdev commented May 5, 2023

@Shikha0321 @Siddhesh1123

I ran into the same issue.

The problem is that the Free API version no longer supports "daily" or "hourly", so the .slice function is reading undefined.

Solution: Remove Forecast components from App.jsx, and daily and hourly from weatherServices.js. This fixes the issue.

@Siddhesh1123
Copy link

Yes ,Thanks you. I already done it thanks anyway 👍

@Shashwat-pati
Copy link

Shashwat-pati commented Jul 16, 2023

@yang2674
Can you please explain where to edit in App.js and weatherServices.js ??
I am not getting it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants