0
我需要創建一個新的反應應用程序create-react-app
版本1.0.10。但是,當我做create-react-app myProject
時,它自動使用當時可用的最新版本create-react-app
。是否有任何命令可用於使create-react-app使用特定版本創建項目模板?如何使用特定版本的create-react-app創建反應項目?
我需要創建一個新的反應應用程序create-react-app
版本1.0.10。但是,當我做create-react-app myProject
時,它自動使用當時可用的最新版本create-react-app
。是否有任何命令可用於使create-react-app使用特定版本創建項目模板?如何使用特定版本的create-react-app創建反應項目?
你需要運行:
npm install --save --save-exact [email protected]
或
yarn add --exact [email protected]
這隻會在尚未退出又一個項目工作中,以獲得更多信息
閱讀 this
你試過安裝1.0.10嗎? 'npm install create-react-app @ 1.0.10'?最有可能的是它在全球安裝,所以你必須在本地安裝,然後從那裏運行它。 –
你的意思是在本地安裝在一個項目中? –
'create-react-app'是一個全局包,因此您可以在機器上全局安裝該包的1個版本,無論您身處何處,都可以鍵入'create-react-app myProject'。正如@HenrikAndersson所建議的那樣,如果你在全局安裝一個特定的版本:'npm -g install create-react-app @ 1.0.10',每次使用它時,它都會是那個版本 – maxgallo