🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
``` Error: Cannot find module 'webpack-cli/bin/config-yargs' ``` ``` > webpack-dev-server --hot --mode development internal/modules/cjs/loader.js:818 throw err; ^ Error: Cannot find module 'webpack-cli/bin/config-yargs' ``` ``` "dev2": " webpack-dev-server --hot --mode development" ``` ``` "dev2": "webpack-cli --hot --mode development" ``` ``` [webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not matc h the API schema. - configuration.module has an unknown property 'resolve'. These properties are valid: object { defaultRules?, exprContextCritical?, exprContextRecursive?, exprContextRegExp?, exprContextRequest?, generat or?, noParse?, parser?, rules?, strictExportPresence?, strictThisContextOnImports?, unknownContextCritical?, unknownCont extRecursive?, unknownContextRegExp?, unknownContextRequest?, unsafeCache?, wrappedContextCritical?, wrappedContextRecur sive?, wrappedContextRegExp? } -> Options affecting the normal modules (`NormalModuleFactory`). ``` ``` // resolve:{ // extensions:['','.js','jsx'] // } ``` ``` [webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not matc h the API schema. - configuration.module has an unknown property 'plugins'. These properties are valid: object { defaultRules?, exprContextCritical?, exprContextRecursive?, exprContextRegExp?, exprContextRequest?, generat or?, noParse?, parser?, rules?, strictExportPresence?, strictThisContextOnImports?, unknownContextCritical?, unknownCont extRecursive?, unknownContextRegExp?, unknownContextRequest?, unsafeCache?, wrappedContextCritical?, wrappedContextRecur sive?, wrappedContextRegExp? } -> Options affecting the normal modules (`NormalModuleFactory`). ``` ``` // plugins:[ // new HtmlwebpackPlugin({ // title:'my first react app' // }) // ], ``` ``` [webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not matc h the API schema. - configuration.module has an unknown property 'loaders'. These properties are valid: object { defaultRules?, exprContextCritical?, exprContextRecursive?, exprContextRegExp?, exprContextRequest?, generat or?, noParse?, parser?, rules?, strictExportPresence?, strictThisContextOnImports?, unknownContextCritical?, unknownCont extRecursive?, unknownContextRegExp?, unknownContextRequest?, unsafeCache?, wrappedContextCritical?, wrappedContextRecur sive?, wrappedContextRegExp? } -> Options affecting the normal modules (`NormalModuleFactory`). Did you mean module.rules or module.rules.*.use? ``` ``` rules:[ { test:/\.jsx?$/, loader:'babel', include:APP_PATH } ], ``` ``` [webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not matc h the API schema. - configuration.module has an unknown property 'preLoaders'. These properties are valid: object { defaultRules?, exprContextCritical?, exprContextRecursive?, exprContextRegExp?, exprContextRequest?, generat or?, noParse?, parser?, rules?, strictExportPresence?, strictThisContextOnImports?, unknownContextCritical?, unknownCont extRecursive?, unknownContextRegExp?, unknownContextRequest?, unsafeCache?, wrappedContextCritical?, wrappedContextRecur sive?, wrappedContextRegExp? } -> Options affecting the normal modules (`NormalModuleFactory`). - configuration.module.rules[0] has an unknown property 'loaders'. These properties are valid: object { assert?, compiler?, dependency?, descriptionData?, enforce?, exclude?, generator?, include?, issuer?, issuer Layer?, layer?, loader?, mimetype?, oneOf?, options?, parser?, realResource?, resolve?, resource?, resourceFragment?, re sourceQuery?, rules?, scheme?, sideEffects?, test?, type?, use? } -> A rule description with conditions and effects for modules. ``` ``` // preLoaders:[ // { // test:/\.jsx?$/, // loader:['eslint'], // include:APP_PATH // } // ], ``` ``` [webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not matc h the API schema. - configuration.module.rules[0] has an unknown property 'loaders'. These properties are valid: object { assert?, compiler?, dependency?, descriptionData?, enforce?, exclude?, generator?, include?, issuer?, issuer Layer?, layer?, loader?, mimetype?, oneOf?, options?, parser?, realResource?, resolve?, resource?, resourceFragment?, re sourceQuery?, rules?, scheme?, sideEffects?, test?, type?, use? } -> A rule description with conditions and effects for modules. ``` ``` rules:[ { test:/\.jsx?$/, loader:'babel', include:APP_PATH } ], ``` ``` [webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not matc h the API schema. - configuration.module.rules[0] should be one of these: ["..." | object { assert?, compiler?, dependency?, descriptionData?, enforce?, exclude?, generator?, include?, issuer ?, issuerLayer?, layer?, loader?, mimetype?, oneOf?, options?, parser?, realResource?, resolve?, resource?, resourceFrag ment?, resourceQuery?, rules?, scheme?, sideEffects?, test?, type?, use? }, ...] -> A rule. Details: * configuration.module.rules[0].loader should be a non-empty string. -> A loader request. ``` ``` rules:[ { test:/\.jsx?$/, loader:'babel', include:APP_PATH } ], ```