簡體   English   中英

構建 REACT 項目錯誤消息(“index.html”= index.html 的入口點 html-webpack-plugin)

[英]Building REACT Project Error Message (Entrypoint html-webpack-plugin for "index.html" = index.html)

我無法使用npm run build構建我的npm run build項目,因為我不斷收到以下錯誤消息:

Child __offline_serviceworker:
     1 asset
    Entrypoint __offline_serviceworker = __offline_serviceworker
Child html-webpack-plugin for "index.html":
     1 asset
    Entrypoint html-webpack-plugin for "index.html" = index.html

我對構建 React 項目還很陌生,如果這是一個業余問題,我深表歉意。 我已經嘗試過的:

  1. 我已經嘗試按照這個html-webpack-plugin Entrypoint undefined = index.html更改入口點,但它仍然沒有工作。

  2. 我也嘗試將 webpack 降級到3.07 ,但該解決方案也無濟於事。

  3. 我已經嘗試了其他選項,包括npm i mishoo/UglifyJS2#harmony在終端中指出: https : //github.com/webpack/webpack-pwa/issues/7但仍然沒有運氣

我目前想不出任何其他解決方案,因此我決定在這里發布。

我的 webpack 位於: internals/webpack/webpack.prod.babel

我的index.html位於根文件夾中

在我的 package.json 中,我有 webpack 如下:

"devDependencies": {
 "html-webpack-plugin": "3.0.7",
...
}

我非常感謝幫助解決這個問題。 提前謝謝大家。

只有當您在 package.json 文件中指定構建所需的內容時, npm run build才會起作用。 但是如果您的意圖只是安裝軟件包(即第一步),請運行“ npm install ”並運行代碼運行“ npm start

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM