JaeChul Lee
@ebonny0255
Reviews Written
3
Average Rating
5.0
Posts
Q&A
Fragment UserViewFragment{755083c (97350660-0d15-4791-b814-9fd04e9c5cc3)} not attached to a context ์ค๋ฅ๋ฌธ์
์์ฐ~ ๊น์ง๋ฅ์ฐ๋ ์ ๋ง ๊ฐ์ฌํฉ๋๋ค~! ์ด์ ์ ๋๋ค์~ ^0^
- 2
- 7
- 487
Q&A
Fragment UserViewFragment{755083c (97350660-0d15-4791-b814-9fd04e9c5cc3)} not attached to a context ์ค๋ฅ๋ฌธ์
์ ๋ ๊ฐ์ ์ค๋ฅ๊ฐ ๋๋๋ฐ ์ด๋์ ๋ญ ์ด๋ป๊ฒ remove ์์ผ์ค์ผํ๋๊ฑด์ง ๋ํต ๋ชจ๋ฅด๊ฒ ๋ค์ ใ ใ ์ฝ๋๋ก ์ข ์๋ ค์ฃผ์๋ฉด ์ ๋ง ๊ฐ์ฌํ๊ฒ ์ต๋๋ค~!!
- 2
- 7
- 487
Q&A
๊ตฌ๊ธ ๋ก๊ทธ์ธ ์๋์๋ ๋ถ๋ค SHA1 ํค ๋ฑ๋ก๋ฐฉ๋ฒ์ ๋๋ค.
๋ณธํ๋๋, ์ ๋ ์๋์ด๊ฐ๋์ค ์์๋๋ฐ ์ข ๊ธฐ๋ค๋ฆฌ๋๊น ๋์ด๊ฐ๋ค์
- 17
- 7
- 4.2K
Q&A
cors ์ค๋ฅ๊ฐ ๋ฉ๋๋ค
์ ๊ฐ์ฌํฉ๋๋ค~! ๋น์ฅ ํ์ธํด๋ณด๊ฒ ์ต๋๋ค~! ^0^
- 0
- 2
- 333
Q&A
ํ๋กํ ํ์ด์ง์์ 401 ์๋ฌ๊ฐ๋ฉ๋๋ค ใ ใ
์์ ํ์ต๋๋ค~~!!!! ์ฅ์ฅ 6์๊ฐ์ด ๊ฑธ๋ ธ๋ค์ ใ ใ ์ ๋ก์ด๋์ด ์ค๊ฐ์ค๊ฐ ๊ณ์ ๋ด์ฃผ์ ์ ํ์ ๋ผ ์ ์์์ต๋๋ค. ์ต์ข ์์ธ์ ์ ๊ฐ reducer ํธ๋ค๋ฌ ๋ฆฌํฉํ ๋งํ ๋ถ๋ถ์ ์์์ต๋๋ค. ์ ๋ง ๊ฐ์ฌํฉ๋๋ค~!!!
- 0
- 12
- 1.4K
Q&A
ํ๋กํ ํ์ด์ง์์ 401 ์๋ฌ๊ฐ๋ฉ๋๋ค ใ ใ
์ง๊ธํด๋ณด๋ ๋ก์ปฌ์์๋ ํ๋ฆฌ๋ค์ฌ~ ์์ฐ ๋ก์ปฌ์์ ๋ก๊ทธ์ธํ F5 ๋๋ฅด๋ฉด ํ๋ ค๋ฒ๋ฆฌ๊ณ ์ ๊ทธ ์ํ์์ ํ๋กํ๋ก ๊ฐ๋ฉด ๋ ๋ก๊ทธ์ธ์ด ๋์ด ์์ต๋๋ค. ๊ทธ ๋ค์๋ถํฐ๋ F5 ๋๋ฌ๋ ์ํ๋ฆฌ๊ณ ์ฌ. ์ ๊ฐ ๋ญ๊ฐ ์ค์ํ ๋ถ๋ถ์ด ์๋๊ฒ ๊ฐ์ต๋๋ค.
- 0
- 12
- 1.4K
Q&A
ํ๋กํ ํ์ด์ง์์ 401 ์๋ฌ๊ฐ๋ฉ๋๋ค ใ ใ
์, ์ด ๋ฆ์์๊ฐ๊น์ง ์ ๊ฒฝ์จ์ฃผ์ ์ ์ ๋ง ๊ฐ์ฌํ๋๋ค~! Send ๋ก ๋ณด๋ด๋ ๋ถ๋ถ ์ ๋ถ axios ๋ก ๋ฐ๊ฟจ์ต๋๋ค. ํน์ front ์๋ฒ์ build ํด๋์ Send ์ ํ์ ์ด ๋จ์์ ๊ทธ๋ฐ๊ฑด๊ฐ ์ถ์ด์ build ํ๊ฑธ ์น ์ด๊ธฐํํ๊ณ ๋ค์ build ํ๊ณ ์ถ์๋ฐ ์ด๋ป๊ฒ ํ๋์ค ๋ชฐ๋ผ์ ๊ทธ๋ฅ npm run build ํ๊ณ ์ฌ์์๋ง ํ ์ํ์ ๋๋ค. ใ ใ ์ ๋ ์ผ๋จ ์์ฌ๋๋๊ฒ Send ์ฌ์ ๋ก๊ทธ์ธ์ฌ์ฉ์ ์ ๋ณด ๊ฐ์ ธ์ค๋ ๋ถ๋ถ๋ง axios ๋ฅผ ์จ์ axios.get("http://api.webcenter.one/user") ๋ผ๊ณ ๋ฐ๊ฟ์ ํด๋ดค๋๋ ๋ก๊ทธ์ธ์ด ์ํ๋ฆฌ๋๋ผ๊ณ ์. ๊ทธ๋์ Send ๋ถ๋ถ ๋ค ๋นผ๊ณ axios ๋ก ๋ฐ๊พธ๊ณ ๋๋ ๋ค์ ๋ก๊ทธ์ธ ํ๋ฆฌ๋ ๋ฌธ์ ๊ฐ ๋ฐ์ํ๋๋ผ๊ตฌ์ฌ ใ ใ - sagas/index.js ์ ๋๋ค. import user from './user'; import post from './post'; import { combineReducers } from 'redux'; import { HYDRATE } from 'next-redux-wrapper'; import { userSaga } from './user'; import { postSaga } from './post'; import { all } from 'redux-saga/effects'; import axios from 'axios'; import { backUrl } from '../config/config'; axios.defaults.baseURL = backUrl; axios.defaults.withCredentials = true; const rootReducer = (state, action) => { switch (action.type) { case HYDRATE: console.log('HYDRATE', action); return action.payload; default: const combinedReducer = combineReducers({ user, post, }); return combinedReducer(state, action); } }; export function* rootSaga() { yield all([userSaga(), postSaga()]); } export default rootReducer;
- 0
- 12
- 1.4K
Q&A
ํ๋กํ ํ์ด์ง์์ 401 ์๋ฌ๊ฐ๋ฉ๋๋ค ใ ใ
์์ฐธ, getServerSideProps ์ cookie ๊ฐ๋ ์ฐํ๊ฒ ํด๋จ๋๋ฐ ํฌ๋กฌ ๊ฐ๋ฐ์๋๊ตฌ์์ log ๊ฐ ์๋ณด์ด๋ค์. pm2 ๋ชจ๋ํฐ์์ ์คํฌ๋กค์ด ์๋ด๋ ค๊ฐ์ ํ์ธ์ด ์๋๊ตฌ์ ใ ใ export const getServerSideProps = wrapper.getServerSideProps(async context => { const cookie = context.req ? context.req.headers.cookie : ''; console.log('######### in ServerSideProps, cookie=', cookie); axios.defaults.headers.Cookie = ''; if (context.req && cookie) { axios.defaults.headers.Cookie = cookie; } context.store.dispatch(loadUserSessionAction()); context.store.dispatch(loadPostsAction()); context.store.dispatch(END); await context.store.sagaTask.toPromise(); }); export default Home;
- 0
- 12
- 1.4K
Q&A
ํ๋กํ ํ์ด์ง์์ 401 ์๋ฌ๊ฐ๋ฉ๋๋ค ใ ใ
npx pm2 monit ๋๋ ค๋๊ณ ๋ก๊ทธ์ธ ํ req.user ์ธํ ๋๊ตฌ ์๊ตฌ์ฌ F5 ๋ก ํ๋ฉด๊ฐฑ์ ํ๋ฉด ๋ก๊ทธ์ธ์ด ํ๋ ค๋ฒ๋ฆฌ๊ณ ๋ก๊ทธ ํ์ธํ๋ฉด ์๋์ ๊ฐ์ด req.user ๊ฐ undefined ๋ก ๋์ด์์ด์ (์ฌ์ง) ๋ก๊ทธ ์ฐ์๋ถ๋ถ ์ฝ๋์ ๋๋ค. router.get("/", async (req, res, next) => { try { console.log(":::::::: Load Session, req.user=", req.user); if (req.user) { const fullUser = await users.findOne({ where: { id: req.user.id }, attributes: { exclude: ["password"], }, include: [ { model: posts, as: "posts", attributes: ["id"] }, // ๋ธ๋ผ์ฐ์ ์์ user.posts ์ post ์ ๋ชจ๋ ์ ๋ณด๊ฐ ๋ด๊ฒจ์์ผ๋ฉด ๋ฉ๋ชจ๋ฆฌ ๋ญ๋น๊ฐ ๋ฐ์ํ๋ฏ๋ก id ๋ง ๋ณด๋ธ๋ค. { model: users, as: "followings", attributes: ["id"] }, { model: users, as: "followers", attributes: ["id"] }, ], }); res.status(200).json(fullUser); } else { res.status(200).json(null); } } catch (e) { next(e); } });
- 0
- 12
- 1.4K
Q&A
ํ๋กํ ํ์ด์ง์์ 401 ์๋ฌ๊ฐ๋ฉ๋๋ค ใ ใ
ํด์ผ์ค์ ๋ต๋ณ๋ ๋ฌ์์ฃผ์๊ณ ์ ๋ง ๊ฐ์ฌํฉ๋๋ค~ ๊ทผ๋ฐ ๋ฌธ์ ๊ฐ ๋ฐ๊ผ์ด์~ ํฌ๋กฌ ์บ์ ๋ค ๋ ๋ฆฌ๊ณ ๋ค์ ์ ์ํด๋ณด๋ ํ๋กํ๋ก ๊ฐ์๋ 401 ๋ฌธ์ ๋ ์ฌ๋ผ์ก์ต๋๋ค. ใทใท;; ๊ทผ๋ฐ ํ๋กํ์์ ๋ค์ ํ์ผ๋ก ๊ฐ๋ฉด ๋ก๊ทธ์ธ์ด ํ๋ ค์๊ณ ๋ค์ ๋ก๊ทธ์ธํ๋ ค๊ณ ํ๋ฉด "๋ก๊ทธ์ธํ์ง ์์ ์ฌ์ฉ์๋ง ์ ๊ทผ๊ฐ๋ฅํฉ๋๋ค" ๋ฉ์ธ์ง๊ฐ ๋น๋๋ค ใ ใ
- 0
- 12
- 1.4K




