webpack打包專案時typescript報錯The 'files' list in config file 'tsconfig.json' is empty.的解決方法
在用ts和react的專案中進行webpack編譯的時候,會出現如下報錯:
The 'files' list in config file 'tsconfig.json' is empty Module build failed (from ../node_modules/ts-loader/index.js): Error: error while parsing tsconfig.json
我的版本號如下:
"ts-loader": "^5.3.1", "typescript": "^3.2.1", "webpack": "^4.27.1"
經過查詢驗證,解決方案如下:
在ts-loader的配置項中指定ts配置檔案的絕對路徑即可。
原始碼
module: { rules: [ { test: /\.(tsx|ts)$/, loader: 'ts-loader' } ] }
修改後程式碼
module: {
rules: [ { test: /\.(tsx|ts)$/, loader: 'ts-loader',
options: {
configFile: path.resolve(__dirname, '../typescript.json')
}
}
] }
相關推薦
webpack打包專案時typescript報錯The 39;files39; list in config file 39;tsconfig.json39; is empty.的解決方法
在用ts和react的專案中進行webpack編譯的時候,會出現如下報錯: The 'files' list in config file 'tsconfig.json' is empty Module build failed (from ../node_modules/ts-loader/inde
webpack+vue開發專案時遇到報錯如何定位錯誤
前幾天新增一個功能就是,修改localstorage時報的錯,一開始,根本就不知道是什麼原因導致的,然後一直在找原因(ps:對webpack+vue的專案除錯,感覺有點困難,不知道各位大神,看到這樣的錯誤,是如何定位的?正在學習當中,望大神指教一下。)然後我試著在其他瀏覽器開啟,這個問
webpack 打包壓縮 ES6檔案報錯UglifyJs + Unexpected tok
最近在下載別人的vue多頁面demo後,npm run dev沒問題,npm run build之後就報錯: 1、webpack 打包壓縮 ES6檔案報錯UglifyJs + Unexpected token... 最近做專案的時候運用vue,webpack,在打包壓縮的工程中,部分
Run as啟動專案時總報錯Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardCont
[INFO] Scanning for projects... [INFO] [INFO] ------------------------------------
myeclipse10匯入其他地方的專案時jsp報錯的有效解決方法
一直使用的myeclipse2014最近總是彈出證書過期的警告框,剛關閉又彈出,真的搞得很煩,就解除安裝了重新安裝了myeclipse10,匯入原來工作空間的專案,刷!所有專案中的jsp檔案全部報錯,就
Feign呼叫報錯The bean 'XXX.FeignClientSpecification', defined in null, could not be registered....的解決辦法
升級Spring Boot 2.1.0 Spring Cloud Greenwich.M1 版本後,在2個Feign介面類內定義相同的名字, @FeignClient(name = 相同的名字 就會出現報錯,在之前的版本不會提示報錯,報錯內容為The bean 'XXX.
egg+vue+easywebpack+typescript報錯can not bulid module:can find file xxxx.vue
前言 網上很多文章都是 如何利用 vue-cli 建造好專案後 然後修改成typescript模式 開發 文章很多 這裡不說了 不過提醒一個坑 注意webpack的版本 否則 腳手架建立的專案還是webpack3&nbs
Vue報錯:Uncaught TypeError: Cannot assign to read only property’exports‘ of object’#[Object]‘的解決方法
發現問題 1,執行一下以前的一個Vue+webpack的 vue仿新聞網站 小專案,報錯 由於自己vue學習不深入,老是這個報錯,找了好久(確切的說是整整一下午^...^)才找到原因 -v- 2,點開錯誤的檔案,標註錯誤的地方是這樣的一段程式碼: 就是&n
Maven報錯Please ensure you are using JDK 1.4 or above and not a JRE解決方法!
https://www.cnblogs.com/shihua513/p/6163682.html 在eclipse下用maven編譯時,很有可能出現以下錯誤: Please ensure you are using JDK 1.4 or above andnot a JRE (the co
執行登入觸發器(sql server 2016限制IP訪問)後,登入sql server報錯: 由於執行觸發器,登入失敗已將資料庫上下文更改為master。解決方法:用cmd執行刪除登入觸發器
背景: 在cmd中執行osql命令: osql -S 【資料庫伺服器】 -E -i mysql.sql 其中mysql.sql內容如下: CREATE LOGIN test WITH PASSWORD = '輸入密碼' GO
Eclipse中啟動Tomcat時(MAVEN專案),報錯:Could not publish to the server. java.lang.IndexOutOfBoundsException的解決過程
Eclipse中啟動Tomcat時(MAVEN專案),報錯:Could not publish to the server. java.lang.IndexOutOfBoundsException,tomcat啟動失敗, 原因:該MAVEN專案下載的本地jar包存在下載失敗的情況 &nbs
1、webpack搭建專案時出現的報錯“Module build failed (from ./node_modules/css-loader/dist/cjs.js) CssSyntaxError”
控制檯出現的錯誤如下: webpack.config.js中的配置如下: module.exports={ entry:'./src/main.js
iOS打包上傳ipa文件時,報錯<ERROR ITMS-90096: "Your binary is not optimized for iPhone 5 - New iPhone apps......>的解決方案
splay update 分享圖片 trait tin log .com bmi graphic 很長一段時間習慣了用企業級證書發布,最近的新項目使用Xcode 9.1發布到AppStore時遇到了一個小問題(emm..其實問題跟Xcode版本沒關系,我也不知道為什麽要聲明
React Native打包時,報錯 java.lang.NullPointerException (no error message)
FAILURE: Build failed with an exception. what went wrong? java.lang.NullPointerException (no error message) This Problem created when the
windows環境pip安裝時一直報錯Could not fetch URL https://pypi.org/simple/xrld/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=
最近專案不忙了~~有開始專研的python大業,上來想用pip安裝一個第三方的庫,就一直報錯: Could not fetch URL https://pypi.org/simple/xrld/: There was a problem confirming the ssl certificate:
SpringBoot專案報錯the import org.springframework.web.*cannot be resolved..
可能原因是沒有在pom.xml中新增web依賴 新增: <dependency> <groupId>org.springframewo
RN 執行打包 ./gradlew assembleRelease 時的報錯和解決
報錯1: /android/app/build/intermediates/res/merged/android_wqbook/release/drawable-xhdpi/node_modules_reactnavigation_src_views_assets_backicon.
springboot專案下,service層注入其他service時,沒有新增@Autowired,專案中不報錯,就是報空指標
這個問題讓我折騰了快一天,因為這個方法是個通用方法,在別的service都能執行成功,就是在此service下執行不成功, 無意間發現了@autowired註解沒有加,協同開發不知道誰不小心刪除了吧。但是springboot也不報錯, try...catch後總是報空指
webpack 模式報錯 The ‘mode‘ option has not been set.
WARNING in configuration The ‘mode‘ option has not been set. Set ‘mode‘ option to ‘development‘ or ‘p
Pyinstaller打包成exe檔案時,報錯:Cannot find existing PyQt5 plugin directories
如下圖所示:在用PyInstaller將.py檔案打包成exe檔案時出現下面的錯誤: 解決辦法: 根據Paths checked後面的路徑建立資料夾,把Anaconda下的qt資料夾裡的plugins資料夾下的所有檔案複製到新建的資料夾裡,我的電腦上對應的位置是:E:\Anac