[英]TypeError: Cannot read property '0' of undefined Webpack
I'm trying to create a demo of ant-design
for that I've installed ant-design and now when I'm hitting 我正在尝试为已经安装了ant-design的
ant-design
演示创建一个演示,现在当我点击
npm start
I got this error 我得到这个错误
dora: listened on 8000
📦 1/2 build modules/opt/lampp/htdocs/antddemo/node_modules/webpack/lib/ExternalModuleFactoryPlugin.js:19
const dependency = data.dependencies[0];
^
TypeError: Cannot read property '0' of undefined
at /opt/lampp/htdocs/antddemo/node_modules/webpack/lib/ExternalModuleFactoryPlugin.js:19:40
at /opt/lampp/htdocs/antddemo/node_modules/atool-build/node_modules/webpack/lib/NormalModuleFactory.js:159:3
at NormalModuleFactory.<anonymous> (/opt/lampp/htdocs/antddemo/node_modules/atool-build/node_modules/tapable/lib/Tapable.js:82:11)
at /opt/lampp/htdocs/antddemo/node_modules/npm-install-webpack-plugin-cn/src/plugin.js:24:7
at /opt/lampp/htdocs/antddemo/node_modules/atool-build/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:24:19
at onResolved (/opt/lampp/htdocs/antddemo/node_modules/atool-build/node_modules/enhanced-resolve/lib/Resolver.js:38:18)
at innerCallback (/opt/lampp/htdocs/antddemo/node_modules/atool-build/node_modules/enhanced-resolve/lib/Resolver.js:94:11)
at loggingCallbackWrapper (/opt/lampp/htdocs/antddemo/node_modules/atool-build/node_modules/enhanced-resolve/lib/createInnerCallback.js:21:19)
at /opt/lampp/htdocs/antddemo/node_modules/atool-build/node_modules/tapable/lib/Tapable.js:134:6
at /opt/lampp/htdocs/antddemo/node_modules/atool-build/node_modules/enhanced-resolve/lib/ModulesInDirectoriesPlugin.js:54:23
I tried couple of solutions but since I'm new to ant-design
it's getting hard to digest the concept. 我尝试了几种解决方案,但是由于我是
ant-design
新手,因此很难理解这个概念。 Is there anyone for me to fix this? 有谁可以解决这个问题吗?
Thanks in advance :) 提前致谢 :)
Solved this by following installation 通过以下安装解决了这个问题
install extract-text-webpack-plugin@^2.0.0-beta
REF: Webpack Issue#2764 参考: Webpack问题#2764
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.