昨天写的打包什么的都没出问题,今天早上到公司,运行npm run webpack 就报错了

来源:3-2 自动化生成项目中的html页面(中)

不完美

2017-06-29 09:53

昨天写的打包什么的都没出问题,今天早上到公司,运行npm run webpack 就报错了,不知道哪里出问题了,很烦啊!


Child html-webpack-plug

       [0] ./node_modul

es {0} [built] [failed]


    ERROR in ./node_mod

    Module build failed

        at D:\webpack-d

        at apply (D:\we

        at D:\webpack-d

        at apply (D:\we

        at D:\webpack-d

        at Function.tem

2:20)

        at Object.modul

in\lib\loader.js:32:20)

npm ERR! code ELIFECYCL

npm ERR! errno 2

npm ERR! webpack-demo@1

ess --display-modules -

npm ERR! Exit status 2

npm ERR!

npm ERR! Failed at the

npm ERR! This is probab

ging output above.


npm ERR! A complete log

npm ERR!     C:\Users\A

1_41_57_367Z-debug.log


写回答 关注

1回答

  • 不完美
    2017-06-29 10:04:23

    好吧,我把<% for(var key in htmlWebpackPlugin) { %>
    <%= key %>
    <% } %>这段代码注释掉之后就报错了,删了就好了

webpack深入与实战

webpack实战教程,用真实项目带你探索 webpack 强大的功能

86545 学习 · 750 问题

查看课程

相似问题