11,000원
다른 수강생들이 자주 물어보는 질문이 궁금하신가요?
- 미해결Quasar로 만드는 구글 뉴스
q-table data 문제
안녕하세요 강사님. q-list에서 나오던 뉴스데이터가 q-table 사용시 들어오지 않습니다. 콘솔에도 아무 에러 없이 데이터가 잡히는 걸 볼 수 있어서 질문드립니다. 화면에는 'No data available' 이라고만 나오네요. <template> <div> <q-table :data="newsList" :columns="columns" row-key="name" /> <!-- <q-list bordered> <q-item clickable v-ripple v-for="news in newsList" :key="news.source.id"> <q-item-section class="text-h7">{{ news.title }}</q-item-section> <q-item-section side class="text-caption">{{ fromNow(news.publishedAt) }}</q-item-section> </q-item> </q-list> --> </div> </template> <script> import moment from "moment"; export default { data() { return { newsList: [], }; }, async created() { const newsUrl = "https://newsapi.org/v2/everything?q=Apple&from=2022-05-24&sortBy=popularity&apiKey="; const response = await this.$axios.get(newsUrl); console.log(response.data.articles); this.newsList = response.data.articles; }, methods: { fromNow(timestamp) { return moment(timestamp).fromNow(); }, }, }; </script>
- 미해결Quasar로 만드는 구글 뉴스
axios로 뉴스 정보가 들어오지 않습니다.
안녕하세요 강사님. 말씀하신대로 axios url 앞에 추가로 주소(https://secret-ocean-49799.herokuapp.com/) 를 붙혔는데도 뉴스가 들어오질 않네요. 구글링을 해서 다른 주소 (https://cors-anywhere.herokuapp.com/)를 붙혔는데도 마찬가지이구요, 강사님 github 코드를 붙혀도 마찬가지이네요. export default { async created() { const CORS_PROXY = "https://secret-ocean-49799.herokuapp.com/"; const response = await this.$axios.get( CORS_PROXY + "https://news.google.com/rss?hl=ko&gl=KR&ceid=KR:ko" ); console.log(response); }; 콘솔창에 뜨는 에러 메세지는: GEThttps://secret-ocean-49799.herokuapp.com/https://news.google.com/rss?pz=1&cf=all&hl=ko&gl=KR&ceid=KR:koCORS Missing Allow Origin Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://secret-ocean-49799.herokuapp.com/https://news.google.com/rss?pz=1&cf=all&hl=ko&gl=KR&ceid=KR:ko. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 404. Uncaught (in promise) Error: Network Error createError.js:16 이렇게 3개인데요, 지금 꽤 시간을 투자해서 잡고 있는데 진전이 없어서 문의드립니다.
- 미해결Quasar로 만드는 구글 뉴스
Compiled with problems 질문드립니다.
Compiled with problems: X ERROR in ./node_modules/rss-parser/lib/parser.js 2:13-28 Module not found: Error: Can't resolve 'http' in '/Users/taesukim/Desktop/dev/every-news-in-korea/node_modules/rss-parser/lib' BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it. If you want to include a polyfill, you need to: - add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }' - install 'stream-http' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "http": false } ERROR in ./node_modules/rss-parser/lib/parser.js 3:14-30 Module not found: Error: Can't resolve 'https' in '/Users/taesukim/Desktop/dev/every-news-in-korea/node_modules/rss-parser/lib' BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it. If you want to include a polyfill, you need to: - add a fallback 'resolve.fallback: { "https": require.resolve("https-browserify") }' - install 'https-browserify' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "https": false } let Parser = require('rss-parser');사용 후 위와 같은 에러가 나오는데 어떻게 해결하면 좋을까요? ㅜㅜ
- 미해결Quasar로 만드는 구글 뉴스
Unknown command "dev"
퀘이사 프로젝트 만들기, vs code 설정 강의에서 $ quasar dev 를 입력했는데 Error Unknown command "dev" 이런 결과가 나옵니다. 환경은 윈도우입니다 ㅠㅠ
- 미해결Quasar로 만드는 구글 뉴스
version 이슈로 package.json를 봐야 겠는데 github repo는 어디있나요? :)
version 이슈로 package.json를 봐야 겠는데 github repo는 어디있나요? :)