槑槑mei
2021-01-02 15:59
采纳率: 100%
浏览 1.1k
已结题

vue脚手架3 npm run serve出现问题 跪求解决

WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.resolve has an unknown property 'alia'. These properties are valid:   
   object { alias?, aliasFields?, cachePredicate?, cacheWithContext?, concord?, descriptionFiles?, enforceExtension?, enforceModuleExtension?, extensions?, fileSystem?, mainFields?, mainFiles?, moduleExtensions?, modules?, plugins?, resolver?, roots?, symlinks?, unsafeCache?, useSyncFileSystemCalls? }
   -> Options for the resolver
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.resolve has an unknown property 'alia'. These properties are valid:   
   object { alias?, aliasFields?, cachePredicate?, cacheWithContext?, concord?, descriptionFiles?, enforceExtension?, enforceModuleExtension?, extensions?, fileSystem?, mainFields?, mainFiles?, moduleExtensions?, modules?, plugins?, resolver?, roots?, symlinks?, unsafeCache?, useSyncFileSystemCalls? }
   -> Options for the resolver
    at webpack (D:\WEB\vue\vue项目\mymall\node_modules\@vue\cli-service\node_modules\webpack\lib\webpack.js:31:9)
    at serve (D:\WEB\vue\vue项目\mymall\node_modules\@vue\cli-service\lib\commands\serve.js:163:22)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! supermall@0.1.0 serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the supermall@0.1.0 serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\11710\AppData\Roaming\npm-cache\_logs\2021-01-02T07_51_57_122Z-debug.log

  • 好问题 提建议
  • 收藏

6条回答 默认 最新

  • 仰望星空的代码 2021-01-14 15:48
    已采纳

    截图中的错误信息已经提示了,是你的webpack配置不正确,其中应该是关于别名的配置有问题,可能是配置属性拼写错误,当前写的是“alia”,看看webpack配置中的别名配置项,属性名是不是拼写错了。

    评论
    解决 无用
    打赏 举报
  • 查看更多回答(5条)

相关推荐 更多相似问题