Fork me on GitHub

vue2遇到的一些错误

一、VUE中的VUEX如何调用modules里面的mutations和state
 
0
...mapMutations("workflow",['setApproverConfig', 'setApprover']),
二、Non-nested routes must include a leading slash character. Fix the following routes: - JSExpression
 
出错点
Non-nested routes must include a leading slash character. Fix the following routes:
非嵌套路由必须包含前导斜杠字符
{ path: '/JSExpressionTest', name: 'JSExpressionTest', component: () => import('@/components/JSExpressionTest') }
三、Vue报错:contains both .browserslistrc and package.json with browsers
删除.browserslistrc文件就好了
四、ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
运行别人的vue项目时,先使用npm install命令,再使用npm run serve命令。
在使用npm run serve命令时报错,错误如下:
ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
options has an unknown property ‘disableHostCheck’. These properties are valid: object { allowedHosts?, bonjour?, client?, compress?, devMiddleware?, headers?, historyApiFallback?, host?, hot?, http2?, https?, ipc?, liveReload?, magicHtml?, onAfterSetup Middleware?, onBeforeSetupMiddleware?, onListening?, open?, port?, proxy?, server?, setupExitSignals?, setupMiddlewares?, static?, watchFiles?, webSocketServer? }
解决方法如下:
注释这一行即可
 
0
 
posted @ 2023-07-30 09:19  HelloLLLLL  阅读(146)  评论(0编辑  收藏  举报