課程
/前端開發(fā)
/JavaScript
/當(dāng) React Native 遇到 TypeScript
出現(xiàn) template 文件夾是什么原因?qū)е碌哪?
2019-09-22
源自:當(dāng) React Native 遇到 TypeScript 2-1
正在回答
但是有一點,在刪除了全局的react-native-cli后,就不能直接執(zhí)行react-native 命令了,比如說react-native run-ios react-native run-android,需要在前面加上yarn或者npx
yarn react-native run-ios
npx react-native run-ios
android同理
fluff 提問者
今朝 回復(fù) fluff 提問者
是的,就在不久前,react-native-cli的命令發(fā)生了改變。
解決辦法如下:
刪除全局的react-native-cli,這個目前官方已經(jīng)不再維護了。
npm uninstall -g react-native-cli
執(zhí)行安裝命令?
npx?react-native?init?MyApp?--template?react-native-template-typescript
補上項目結(jié)構(gòu)圖
舉報
如何在 React Native 項目中使用 TypeScript。
6 回答通過模版創(chuàng)建的項目不對
1 回答項目有g(shù)ithub鏈接嗎
1 回答老師這個問題要怎么弄???
2 回答 Installing required CocoaPods dependencies 一直卡這
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2019-09-23
但是有一點,在刪除了全局的react-native-cli后,就不能直接執(zhí)行react-native 命令了,比如說react-native run-ios react-native run-android,需要在前面加上yarn或者npx
yarn react-native run-ios
npx react-native run-ios
android同理
2019-09-23
是的,就在不久前,react-native-cli的命令發(fā)生了改變。
解決辦法如下:
刪除全局的react-native-cli,這個目前官方已經(jīng)不再維護了。
npm uninstall -g react-native-cli
執(zhí)行安裝命令?
2019-09-22
補上項目結(jié)構(gòu)圖