【发布时间】:2019-06-21 23:13:09
【问题描述】:
更新 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| &--主要的
$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) 在 light() (C:\Users...\node_modules\vuetify\src\stylus\theme.styl:8:24) 在主题()处(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)
})
在这个问题上找不到太多。有人遇到过这样的事情吗?
【问题讨论】:
-
不,我升级没有问题。您是否还可以提供您的
vuetify.js文件和main.js您导入vuetify的位置。 您之前的 vuetify 版本是什么? -
我已编辑以提供您所要求的内容。我没有发布 Vuetify.js,因为我认为它没有帮助。谢谢!
标签: node.js vue.js npm node-modules vuetify.js