221122 앱 다운로드 랜딩페이지 패키지 목록 및 최신 패키지 업그레이드

나의 재물운? 연애운은?

AI가 봐주는 내 사주팔자 - 운세박사

https://aifortunedoctor.com/

221122 앱 다운로드 랜딩페이지 패키지 목록 및 최신 패키지 업그레이드

영리치 0 1,308 2022.11.22 12:15
"dependencies": {
"@material-ui/core": "^4.11.0",
"@types/node": "^18.11.9",
"@types/react-select": "^3.0.26",
"@types/react-slick": "^0.23.4",
"axios": "^0.20.0",
"mobx": "^5.15.4",
"mobx-react": "^6.2.2",
"mobx-react-lite": "^2.0.7",
"next": "latest",
"next-pwa": "^3.1.4",
"react": "^16.12.0",
"react-device-detect": "^1.14.0",
"react-dom": "^16.12.0",
"react-iframe": "^1.8.0",
"react-kakao-login": "^1.2.2",
"react-select": "^3.1.0",
"react-slick": "^0.27.13",
"slick-carousel": "^1.8.1",
"styled-components": "^5.1.1"
},
"devDependencies": {
"@babel/core": "^7.12.3",
"@babel/plugin-proposal-decorators": "^7.10.1",
"@storybook/addon-actions": "^6.0.28",
"@storybook/addon-essentials": "^6.0.28",
"@storybook/addon-links": "^6.0.28",
"@storybook/addons": "^6.0.28",
"@storybook/react": "^6.0.28",
"@storybook/theming": "^6.0.28",
"@svgr/webpack": "^5.4.0",
"@types/react": "16.9.16",
"@types/react-dom": "16.9.4",
"@types/styled-components": "^5.1.0",
"awesome-typescript-loader": "^5.2.1",
"babel-loader": "^8.1.0",
"babel-plugin-module-resolver": "^4.0.0",
"babel-plugin-styled-components": "^1.10.7",
"cross-env": "7.0.2",
"eslint-config-prettier": "^7.0.0",
"eslint-plugin-prettier": "^3.2.0",
"eslint-plugin-react": "^7.21.5",
"fork-ts-checker-webpack-plugin": "^5.2.1",
"prettier": "^2.2.1",
"react-docgen-typescript-loader": "^3.7.2",
"react-is": "^17.0.1",
"tsconfig-paths-webpack-plugin": "^3.3.0",
"typescript": "3.7.3"


Error: "MyDocument.getInitialProps()" should resolve to an object with a "html" prop set with a valid html string


// static async getInitialProps({ renderPage }: any) {
// const sheet = new ServerStyleSheet();
// const sheet2 = new ServerStyleSheets();
// const page = renderPage((App: any) => (props: any) =>
// sheet.collectStyles(sheet2.collect(<App {...props} />)),
// );
// const styleTags = sheet.getStyleElement();
// const styleTags2 = sheet2.getStyleElement();
// return { ...page, styleTags, styleTags2 };
// }
// Error: "MyDocument.getInitialProps()" should resolve to an object with a "html" prop set with a valid html string

static async getInitialProps(ctx: any) {
const sheet = new ServerStyleSheet();
const sheet2 = new ServerStyleSheets();
const initialProps = await Document.getInitialProps(ctx);
const styleTags = sheet.getStyleElement();
const styleTags2 = sheet2.getStyleElement();
return { ...initialProps, styleTags, styleTags2 };
}


자동으로 value 들어가는 이슈 존재


import Document, {
value Html,
value Head,
value Main,
value NextScript,
} from 'next/document';
import { value ServerStyleSheet } from 'styled-components';
import { value ServerStyleSheets } from '@material-ui/styles';


https://stackoverflow.com/questions/70564950/vscode-prettier-adds-value-to-imports-in-typescript-react

위에서 해결함 걍 껐다 키면 된다는 뜻인듯

개빡침 ㅠ


yarn run build 하면 또 아래와 같은 오류 발생함

Type error: 'config.headers' is possibly 'undefined'.


  36 |     // console.log("token : ", token);

  37 |     if (token && token.accessToken) {

> 38 |       config.headers["Authorization"] = "Bearer " + token.accessToken;

     |       ^

  39 |     }

  40 |     return config;

  41 |   },


ASIS

const token = await StorageGetToken();
// console.log("token : ", token);
if (token && token.accessToken) {
config.headers["Authorization"] = "Bearer " + token.accessToken;
}
return config;


TOBE

const token = await StorageGetToken();
// console.log("token : ", token);
if (token && token.accessToken && config.headers != undefined) {
config.headers['Authorization'] = 'Bearer ' + token.accessToken;
}
return config;




Comments

나의 재물운? 연애운은?

AI가 봐주는 내 사주팔자 - 운세박사

https://aifortunedoctor.com/

Category
Magazine
훈남/훈녀
 
 
 
상점
Facebook Twitter GooglePlus KakaoStory NaverBand