{"id":46,"date":"2023-07-19T10:42:42","date_gmt":"2023-07-19T01:42:42","guid":{"rendered":"http:\/\/www.viw.co.kr\/ep\/?p=46"},"modified":"2023-07-19T10:43:36","modified_gmt":"2023-07-19T01:43:36","slug":"cyberphani-myreactapp-%ec%8b%a4%ed%8c%a8","status":"publish","type":"post","link":"http:\/\/www.viw.co.kr\/ep\/cyberphani-myreactapp-%ec%8b%a4%ed%8c%a8\/","title":{"rendered":"cyberphani\/MyReactApp :: \uc2e4\ud328"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><br><a href=\"https:\/\/github.com\/cyberphani\/MyReactApp\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/cyberphani\/MyReactApp<\/a><br><br>npx&nbsp;create-react-app&nbsp;.&nbsp;&#8211;template&nbsp;typescript<br><br>npm&nbsp;install&nbsp;typescript&nbsp;@types\/node&nbsp;@types\/react&nbsp;@types\/react-dom&nbsp;@types\/jest<br><br>npm&nbsp;i&nbsp;@sinclair\/typebox<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">TypeScript error in C:\/VIW\/MyReactApp-master\/web\/node_modules\/@sinclair\/typebox\/typebox.d.ts(349,42):\n'?' expected.  TS1005\n\n    347 | export type TTemplateLiteralConst&lt;T, Acc extends string&gt; = T extends TUnion&lt;infer U&gt; ? {\n    348 |     [K in keyof U]: TTemplateLiteralUnion&lt;Assert&lt;[U[K]], TTemplateLiteralKind[]&gt;, Acc&gt;;\n  &gt; 349 | }[number] : T extends TTemplateLiteral ? `${Static&lt;T&gt;}` : T extends TLiteral&lt;infer U&gt; ? `${U}` : T extends TString ? `${string}` : T extends TNumber ? `${number}` : T extends TBigInt ? `${bigint}` : T extends TBoolean ? `${boolean}` : never;\n        |                                          ^\n    350 | export type TTemplateLiteralUnion&lt;T extends TTemplateLiteralKind[], Acc extends string = ''&gt; = T extends [infer L, ...infer R] ? `${TTemplateLiteralConst&lt;L, Acc&gt;}${TTemplateLiteralUnion&lt;Assert&lt;R, TTemplateLiteralKind[]&gt;, Acc&gt;}` : T extends [infer L] ? `${TTemplateLiteralConst&lt;L, Acc&gt;}${Acc}` : Acc;\n    351 | export interface TTemplateLiteral&lt;T extends TTemplateLiteralKind[] = TTemplateLiteralKind[]&gt; extends TSchema {\n    352 |     [Kind]: 'TemplateLiteral';<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">package\ub97c \ud2b9\uc815 \ubc84\uc804\uc73c\ub85c \uc124\uce58\ud574\uc57c\ud568.<\/p>\n\n\n\n<pre id=\"code_1689729178624\" class=\"wp-block-preformatted\">npm install typescript@4.1.6\nnpm install -D @types\/express-serve-static-core@4.17.3<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\uc624\ub958&nbsp;<\/p>\n\n\n\n<pre id=\"code_1689729360694\" class=\"wp-block-preformatted\">C:\/VIW\/MyReactApp-master\/web\/node_modules\/@types\/jest\/index.d.ts\nTypeScript error in C:\/VIW\/MyReactApp-master\/web\/node_modules\/@types\/jest\/index.d.ts(1238,40):\n',' expected.  TS1005\n\n    1236 |      * Constructs the type of a spied class.\n    1237 |      *\/\n  &gt; 1238 |     type SpiedClass&lt;T extends abstract new (...args: any) =&gt; any&gt; = SpyInstance&lt;\n         |                                        ^\n    1239 |         InstanceType&lt;T&gt;,\n    1240 |         ConstructorParameters&lt;T&gt;,\n    1241 |         T extends abstract new (...args: any) =&gt; infer C ? C : never<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\ud0c0\uc785\uc2a4\ud06c\ub9bd\ud2b8 \ub2e4\uc2dc \uc124\uce58.<\/p>\n\n\n\n<pre id=\"code_1689729658569\" class=\"wp-block-preformatted\">yarn add typescript @types\/node @types\/react @types\/react-dom @types\/jest<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\uc624\ub958&nbsp;<\/p>\n\n\n\n<pre id=\"code_1689730202271\" class=\"wp-block-preformatted\">Cannot find type definition file for 'color-name'.\n  The file is in the program because:\n    Entry point for implicit type library 'color-name'<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">tsconfig.json \uc218\uc815<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&#8220;types&#8221;: [&#8220;node&#8221;] \ucd94\uac00<\/p>\n\n\n\n<pre id=\"code_1689730330510\" class=\"wp-block-preformatted\">{\n  \"extends\": \".\/tsconfig-base.json\",\n  \"compilerOptions\": {\n    \"types\": [\"node\"]\n  },\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\uc624\ub958 \ubc1c\uc0dd<\/p>\n\n\n\n<pre id=\"code_1689730468957\" class=\"wp-block-preformatted\">TypeScript error in C:\/VIW\/MyReactApp-master\/web\/src\/modules\/department\/components\/DepartmentForm.tsx(61,16):\nJSX element type 'Form' does not have any construct or call signatures.  TS2604\n\n    59 |     renderForm = (formik: FormikProps&lt;any&gt;) =&gt; (\n    60 |         &lt;div className={'form'}&gt;\n  &gt; 61 |               &lt;Form onSubmit={formik.handleSubmit}&gt;\n       |                ^\n    62 |                   &lt;Form.Group widths='equal'&gt;\n    63 |                     &lt;Form.Input\n    64 |                             name='dName' fluid<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/blog.kakaocdn.net\/dn\/Bzj84\/btsn6HKLtr4\/LDMwIr6jSh4edfvxKy0wu0\/img.png\" alt=\"\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/github.com\/cyberphani\/MyReactApp npx&nbsp;create-react-app&nbsp;.&nbsp;&#8211;template&nbsp;typescript npm&nbsp;install&nbsp;typescript&nbsp;@types\/node&nbsp;@types\/react&nbsp;@types\/react-dom&nbsp;@types\/jest npm&nbsp;i&nbsp;@sinclair\/typebox TypeScript error in C:\/VIW\/MyReactApp-master\/web\/node_modules\/@sinclair\/typebox\/typebox.d.ts(349,42): &#8216;?&#8217; expected. TS1005 347 | export type TTemplateLiteralConst&lt;T, Acc extends string&gt; = T extends TUnion&lt;infer U&gt; ? { 348 | [K in keyof U]: TTemplateLiteralUnion&lt;Assert&lt;[U[K]], TTemplateLiteralKind[]&gt;, Acc&gt;;&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-46","post","type-post","status-publish","format-standard","hentry","category-site","no-post-thumbnail"],"_links":{"self":[{"href":"http:\/\/www.viw.co.kr\/ep\/wp-json\/wp\/v2\/posts\/46","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.viw.co.kr\/ep\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.viw.co.kr\/ep\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.viw.co.kr\/ep\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.viw.co.kr\/ep\/wp-json\/wp\/v2\/comments?post=46"}],"version-history":[{"count":1,"href":"http:\/\/www.viw.co.kr\/ep\/wp-json\/wp\/v2\/posts\/46\/revisions"}],"predecessor-version":[{"id":47,"href":"http:\/\/www.viw.co.kr\/ep\/wp-json\/wp\/v2\/posts\/46\/revisions\/47"}],"wp:attachment":[{"href":"http:\/\/www.viw.co.kr\/ep\/wp-json\/wp\/v2\/media?parent=46"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.viw.co.kr\/ep\/wp-json\/wp\/v2\/categories?post=46"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.viw.co.kr\/ep\/wp-json\/wp\/v2\/tags?post=46"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}