问题
I'm trying to create a demo of ant-design
for that I've installed ant-design and now when I'm hitting
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. Is there anyone for me to fix this?
Thanks in advance :)
回答1:
Solved this by following installation
install extract-text-webpack-plugin@^2.0.0-beta
REF: Webpack Issue#2764
来源:https://stackoverflow.com/questions/46929386/typeerror-cannot-read-property-0-of-undefined-webpack