netease-im / NIM_Web_Demo_H5

网易云信Web Demo Html5 移动端适配。【推荐客户得京东卡,首次推荐成单得1500元京东卡,连续推荐2000元/单,上不封顶。】点击参与https://yunxin.163.com/promotion/recommend
357 stars 164 forks source link

npm run prod 卡住不动 #22

Open zhn4 opened 5 years ago

zhn4 commented 5 years ago

运行npm run prod打包,出现这个情况,按照提示的连接去看那个issue也好像也解决不了,请问改怎么解决?

[build]
[build] > NIM_WEB_HTML5_DEMO@1.0.0 build C:\Users\xsl\work\NIM_Web_Demo_H5\package.json
[build] > run-p -lns build:*
[build]
[build] [build:css]
[build] [build:css] > NIM_WEB_HTML5_DEMO@1.0.0 build:css C:\Users\xsl\work\NIM_Web_Demo_H5\package.json
[build] [build:css] > postcss ./src/themes/**/*.css ./src/themes/*.css -c build/postcss.config.js -d ./dist/css --poll --watch
[build] [build:css]
[build] [build:js ]
[build] [build:js ] > NIM_WEB_HTML5_DEMO@1.0.0 build:js C:\Users\xsl\work\NIM_Web_Demo_H5\package.json
[build] [build:js ] > node build/build.webpack.js
[build] [build:js ]
[build] [build:js ] (node:17168) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
[build] [build:js ] parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
[build] [build:css] Waiting for file changes...
[build] [build:js ]
[build] [build:js ]
[build] [build:js ] ======== vux-loader: duplicate-style start~  ========
[build] [build:js ] Starting to optimize CSS...
[build] [build:js ] ======== vux-loader: duplicate-style done!   ========
[build] [build:js ]
[build] [build:js ] Hash: 7685fdeaca142b63d004
[build] [build:js ] Version: webpack 2.7.0
[build] [build:js ] Time: 21108ms
[build] [build:js ]          Asset     Size  Chunks                    Chunk Names
[build] [build:js ]          16.js  4.22 kB      16  [emitted]
[build] [build:js ]           0.js  42.1 kB       0  [emitted]
[build] [build:js ]           2.js  32.2 kB       2  [emitted]
[build] [build:js ]           3.js  18.4 kB       3  [emitted]
[build] [build:js ]           4.js   8.3 kB       4  [emitted]
[build] [build:js ]           5.js  6.86 kB       5  [emitted]
[build] [build:js ]           6.js  14.3 kB       6  [emitted]
[build] [build:js ]           7.js  12.8 kB       7  [emitted]
[build] [build:js ]           8.js  18.1 kB       8  [emitted]
[build] [build:js ]           9.js  2.19 kB       9  [emitted]
[build] [build:js ]          10.js  3.33 kB      10  [emitted]
[build] [build:js ]          11.js  1.59 kB      11  [emitted]
[build] [build:js ]          12.js  4.79 kB      12  [emitted]
[build] [build:js ]          13.js  1.68 kB      13  [emitted]
[build] [build:js ]          14.js  2.39 kB      14  [emitted]
[build] [build:js ]          15.js  7.72 kB      15  [emitted]
[build] [build:js ]           1.js  34.5 kB       1  [emitted]
[build] [build:js ]          17.js   4.7 kB      17  [emitted]
[build] [build:js ]          18.js  3.74 kB      18  [emitted]
[build] [build:js ]          19.js  2.17 kB      19  [emitted]
[build] [build:js ]          20.js  1.08 kB      20  [emitted]
[build] [build:js ]          21.js  3.29 kB      21  [emitted]
[build] [build:js ]          22.js  1.74 kB      22  [emitted]
[build] [build:js ]          23.js  1.51 kB      23  [emitted]
[build] [build:js ]          24.js   1.6 kB      24  [emitted]
[build] [build:js ]        main.js   953 kB      25  [emitted]  [big]  main
[build] [build:js ]      regist.js   687 kB      26  [emitted]  [big]  regist
[build] [build:js ]     patient.js   162 kB      27  [emitted]         patient
[build] [build:js ]      doctor.js   162 kB      28  [emitted]         doctor
[build] [build:js ] bindPatient.js   168 kB      29  [emitted]         bindPatient
[build] [build:js ]  bindDoctor.js   167 kB      30  [emitted]         bindDoctor
[build] [build:js ]       login.js   135 kB      31  [emitted]         login
[build] [build:js ]

webpack.config.js加入提示,process.traceDeprecation = true,然后代码跑起来这样

[build] [build:js ] (node:1284) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
[build] [build:js ] parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
[build] [build:js ]     at Object.parseQuery (C:\Users\xsl\work\NIM_Web_Demo_H5\node_modules\loader-utils\index.js:78:3)
[build] [build:js ]     at Object.module.exports (C:\Users\xsl\work\NIM_Web_Demo_H5\node_modules\babel-loader\lib\index.js:104:35)
[build] [build:js ]     at LOADER_EXECUTION (C:\Users\xsl\work\NIM_Web_Demo_H5\node_modules\loader-runner\lib\LoaderRunner.js:119:14)
[build] [build:js ]     at runSyncOrAsync (C:\Users\xsl\work\NIM_Web_Demo_H5\node_modules\loader-runner\lib\LoaderRunner.js:120:4)
[build] [build:js ]     at iterateNormalLoaders (C:\Users\xsl\work\NIM_Web_Demo_H5\node_modules\loader-runner\lib\LoaderRunner.js:229:2)
[build] [build:js ]     at iterateNormalLoaders (C:\Users\xsl\work\NIM_Web_Demo_H5\node_modules\loader-runner\lib\LoaderRunner.js:218:10)
[build] [build:js ]     at C:\Users\xsl\work\NIM_Web_Demo_H5\node_modules\loader-runner\lib\LoaderRunner.js:233:3
[build] [build:js ]     at runSyncOrAsync (C:\Users\xsl\work\NIM_Web_Demo_H5\node_modules\loader-runner\lib\LoaderRunner.js:130:11)
[build] [build:js ]     at iterateNormalLoaders (C:\Users\xsl\work\NIM_Web_Demo_H5\node_modules\loader-runner\lib\LoaderRunner.js:229:2)
[build] [build:js ]     at Array.<anonymous> (C:\Users\xsl\work\NIM_Web_Demo_H5\node_modules\loader-runner\lib\LoaderRunner.js:202:4)
zhn4 commented 5 years ago

解决办法升级babel-loader到7.0.0,已解决,请关闭

CloudEmperor commented 5 years ago

我也遇到这种问题,babel-loader到7.0.0,还是不行。

figorchen commented 3 years ago

执行一下 npm install rimraf -g就好了, 神坑!!!