更新Vuetify和Vue之后,出现此错误:
模块构建失败:错误:C:\ Users ... \ node_modules \ vuetify \ src \ stylus \ components_app.styl:25:25 21 |职位:相对 22 | 23 |申请书($材料) 24 |背景:$ material.background 25 |颜色:$ material.text.primary ------------------------------- ^ 26 | 27 | 。文本 28 | &-primary
$ material.text没有属性.primary 在application()(C:\ Users ... \ node_modules \ vuetify \ src \ stylus \ components_app.styl:24:22) 在“ .theme--light.application”处(C:\ Users ... \ node_modules \ vuetify \ src \ stylus \ theme.styl:8:25) at light()(C:\ Users ... \ node_modules \ vuetify \ src \ stylus \ theme.styl:8:24) 在theme()(C:\ Users ... \ node_modules \ vuetify \ src \ stylus \ theme.styl:4:24)
我正在从Vuetify 0.8.7升级。我知道这太过时了,这是我在工作中继承的项目。我尝试过更新vue和vuetify,手动更新其依赖项,vue-loader,vue-style-loader,vue-template-compiler。
这是我的package.json devDependencies
"dependencies": {
"axios": "^0.16.2",
"chart.js": "^2.7.3",
"chartjs-plugin-annotation": "^0.5.5",
"d3": "^4.11.0",
"d3-sankey": "^0.7.1",
"hdfs": "^1.0.1",
"net": "^1.0.2",
"nouislider": "^10.1.0",
"numeral": "^2.0.6",
"tls": "0.0.1",
"v-file-upload": "^3.1.0",
"vee-validate": "^2.0.0-rc.23",
"vue": "^2.5.22",
"vue-chartjs": "^2.8.7",
"vue-router": "^2.7.0",
"vuetify": "^1.4.3",
"vuex": "^2.4.0",
"vuex-persistedstate": "^2.4.2",
"webhdfs": "^1.1.1"
}, "devDependencies": {
"autoprefixer": "^6.7.2",
"babel-core": "^6.26.3",
"babel-eslint": "^7.1.1",
"babel-loader": "^6.2.10",
"babel-plugin-istanbul": "^4.1.5",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-preset-env": "^1.7.0",
"babel-preset-stage-2": "^6.22.0",
"babel-register": "^6.26.0",
"bootstrap-vue": "^0.15.8",
"chai": "^3.5.0",
"chalk": "^1.1.3",
"chromedriver": "^2.45.0",
"connect-history-api-fallback": "^1.3.0",
"copy-webpack-plugin": "^4.0.1",
"cross-env": "^4.0.0",
"cross-spawn": "^5.0.1",
"css-loader": "^0.28.7",
"d3-sankey": "^0.7.1",
"eslint": "^3.19.0",
"eslint-config-standard": "^6.2.1",
"eslint-friendly-formatter": "^2.0.7",
"eslint-loader": "^1.9.0",
"eslint-plugin-html": "^2.0.0",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^2.0.1",
"eventsource-polyfill": "^0.9.6",
"express": "^4.16.4",
"extract-text-webpack-plugin": "^2.1.2",
"file-loader": "^0.11.2",
"friendly-errors-webpack-plugin": "^1.1.3",
"html-webpack-plugin": "^2.30.1",
"http-proxy-middleware": "^0.17.3",
"inject-loader": "^3.0.1",
"karma": "^1.7.1",
"karma-coverage": "^1.1.2",
"karma-mocha": "^1.3.0",
"karma-phantomjs-launcher": "^1.0.2",
"karma-phantomjs-shim": "^1.5.0",
"karma-sinon-chai": "^1.3.2",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "0.0.30",
"karma-webpack": "^2.0.4",
"lolex": "^1.5.2",
"mocha": "^3.5.3",
"nightwatch": "^0.9.16",
"node-sass": "^4.11.0",
"opn": "^4.0.2",
"optimize-css-assets-webpack-plugin": "^1.3.2",
"ora": "^1.3.0",
"phantomjs-prebuilt": "^2.1.16",
"rimraf": "^2.6.2",
"sass-loader": "^6.0.6",
"selenium-server": "^3.5.3",
"semver": "^5.4.1",
"shelljs": "^0.7.8",
"sinon": "^2.4.1",
"sinon-chai": "^2.13.0",
"style-loader": "^0.17.0",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.1",
"url-loader": "^0.5.9",
"vue-loader": "^11.3.4",
"vue-style-loader": "^2.0.5",
"vue-template-compiler": "^2.5.22",
"webpack": "^2.7.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-middleware": "^1.12.0",
"webpack-hot-middleware": "^2.19.1",
"webpack-merge": "^4.1.0"
}
这是我的main.js
import Vue from 'vue'
import App from './App'
import router from './router'
import Vuetify from 'vuetify'
import VeeValidate from 'vee-validate'
import store from './store'
Vue.config.productionTip = false
Vue.use(Vuetify)
Vue.use(VeeValidate, {
errorBagName: 'vErrors'
})
/* eslint-disable no-new */
new Vue({
el: '#app',
store,
router,
render: h => h(App)
})
在此问题上找不到太多内容。有人遇到过这样的事情吗?
答案 0 :(得分:0)
您进行了非常大的更新。改变的一切都很难。我将发布一些您需要检查的内容,并假设其他所有内容都是最新的。希望您的问题出在这些文件之一中
main.js:
import Vue from 'vue'
import "./plugins/vuetify";
import App from './App'
import router from './router'
import VeeValidate from 'vee-validate'
import store from './store'
Vue.config.productionTip = false
Vue.use(VeeValidate, {
errorBagName: 'vErrors'
})
/* eslint-disable no-new */
new Vue({
el: '#app',
store,
router,
render: h => h(App)
})
vuetify.js:
import Vue from 'vue'
import Vuetify from 'vuetify/lib'
import 'vuetify/src/stylus/app.styl'
Vue.use(Vuetify, {
iconfont: 'md',
})
index.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>temp</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons">
</head>
<body>
<noscript>
<strong>We're sorry but temp doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>