webpack提示Cannot read property ‘properties’ of undefined错误
提示这样一堆错误
/Users/xxx/Code/js/xxx/node_modules/_webpack-cli@2.1.5@webpack-cli/bin/config-yargs.js:89
describe: optionsSchema.definitions.output.properties.path.description,
^
TypeError: Cannot read property 'properties' of undefined
at module.exports (/Users/xxx/Code/js/xxx/node_modules/_webpack-cli@2.1.5@webpack-cli/bin/config-yargs.js:89:48)
at Object.<anonymous> (/Users/xxx/Code/js/xxx/node_modules/_webpack-dev-server@3.1.9@webpack-dev-server/bin/webpack-dev-server.js:84:40)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:266:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:596:3)
出现这个错误是因为webpack-cli版本的问题,升级到3.1.1版本或更新即可。
npm i webpack-cli@3.1.1 -D
再运行就没有问题了。
如果您觉得本文对您有用,欢迎捐赠或留言~
- 本博客所有文章除特别声明外,均可转载和分享,转载请注明出处!
- 本文地址:https://www.leevii.com/?p=1504