国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

React refers to UMD global, but the current file is a module vite初始化react項目

這篇具有很好參考價值的文章主要介紹了React refers to UMD global, but the current file is a module vite初始化react項目。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

vite搭建react項目

初始化項目

npm create vite

在執(zhí)行完上面的命令后,npm 首先會自動下載create-vite這個第三方包,然后執(zhí)行這個包中的項目初始化邏輯。輸入項目名稱之后按下回車,此時需要選擇構(gòu)建的前端框架:

? Project name: vite-project

? Select a framework: ? - Use arrow-keys. Return to submit.

? ? vanilla // 無前端框架

? ? vue ? ? // 基于 Vue

>? react ? // 基于 React

? ? preact? // 基于 Preact(一款精簡版的類 React 框架)

? ? lit ? ? // 基于 lit(一款 Web Components 框架)

? ? svelte? // 基于 Svelte

選中react后們還有個選項,我們選擇typescript

切換到項目按照依賴后跑起來
?

cd vite-project

npm install

npm run dev

vscode編輯器報紅

React refers to UMD global, but the current file is a module

In VSCode, you can press?CTRL + Shift + P?or (??+?Shift?+?P?on Mac) to open the command palette.

Type?"typescript version"?in the input

React refers to UMD global, but the current file is a module vite初始化react項目,react.js,前端,前端框架

Property 'a' does not exist on type 'JSX.IntrinsicElements'?

處理方法同上

參考:類型“JSX. IntrinsicElement”上不存在屬性“div”,當(dāng)我用vite創(chuàng)建react typescript項目時 _大數(shù)據(jù)知識庫?文章來源地址http://www.zghlxwxcb.cn/news/detail-703752.html

到了這里,關(guān)于React refers to UMD global, but the current file is a module vite初始化react項目的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進(jìn)行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包