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
 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章