«$ material.text не имеет свойства .primary» в vuetify / src / stylus / components / _app.styl после обновления vuetify - PullRequest
0 голосов
/ 29 января 2019

После обновления Vuetify и Vue я получаю эту ошибку:

Ошибка сборки модуля: Ошибка: C: \ Users ... \ node_modules \ vuetify \ src \ stylus \ components_app.styl: 25: 2521 |положение: родственник 22 |23 |заявка ($ материал) 24 |фон: $ материал.бэкграунд 25 |цвет: $ material.text.primary ------------------------------- ^ 26 |27 |.text 28 |& - primary

$ material.text не имеет свойства .primary при применении () (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) at 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)
})

Не могу найти много по этому вопросу.Кто-нибудь сталкивался с чем-то вроде этого?

1 Ответ

0 голосов
/ 31 января 2019

Вы сделали очень большое обновление.Довольно сложно все, что изменилось.Я опубликую несколько вещей, которые вы должны проверить, предполагая, что все остальное в курсе.Надеюсь, что ваша проблема в одном из этих файлов

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>
...