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

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条回答 默认 最新

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

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

    点赞 评论
  • a11710231500
    槑槑mei 2021-01-02 16:04

    点赞 评论
  • Lazy33
    Lazy33 2021-01-02 23:57

    好别扭啊,你跑的项目首先能不能把路劲里的中文去掉

    点赞 评论
  • Lazy33
    Lazy33 2021-01-03 00:03

    拉取之后记得install 

    不行就删掉node_modules 再来一遍 

    不行就删掉node_modules、package-lock.json 再来一遍

    再着不行的话。。。emmmm你看看是不是你用的cnpm,或者淘宝镜像, 然后哪个包被墙掉了 

    点赞 评论
  • sunny_desmond
    carrykingdow 2021-01-06 10:45
    1. 查看自己的node版本是否正确
    2. 删除node_modules包重新npm install一下
    3. 不行的话,考虑使用cnpm install 

     

    点赞 评论
  • qq_33490514
    杨周龙 2021-01-15 22:59

    webpack 配置错误,应该是 alias 别名不是 alia

    点赞 评论

相关推荐