iT邦幫忙

0

TypeScript 之 Gulp 報錯(Ans:降低版本的解決方法)

Target:

->解決您Gulp報錯的問題,照片如下。當你出現這問題時,代表您的Gulp版本過高。
https://ithelp.ithome.com.tw/upload/images/20190724/20118371VPmCS0o458.png

Solution:

1.首先先到您的Package.json中看到Gulp那行版本,如下圖所示。
if>4,代表版本太高,需要將版本將至4以下。
https://ithelp.ithome.com.tw/upload/images/20190724/201183712Jh2vWUUbJ.png

2.接者開啟終端機到Package.json的那個資料夾

3.輸入(這個動作可以先幫您卸載Gulp

npm uninstall 'gulp'

4.卸載完後,重新安裝。故輸入:

npm install gulp@3.9.1 -D
//這個是npm 會幫你安裝在[devDependencies]這個地方(用於開發環境)

or

npm install gulp@3.9.1 
//這個是npm 會幫你安裝在[Dependencies]這個地方(用於生產環境)

5.安裝完後,應該會顯示如下圖。
https://ithelp.ithome.com.tw/upload/images/20190724/20118371BpZnJXuyUN.png

6.再來按Gulp,即可編譯完成。(如圖所示)
https://ithelp.ithome.com.tw/upload/images/20190724/20118371vA1KEA3Ty3.png


圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言