ERROR TypeError: Cannot read property 'match' of undefined
ERROR TypeError: Cannot read property 'match' of undefined
npm 运行 构建给出
ERROR TypeError: Cannot read property 'match' of undefined.
- Building for production...
ERROR TypeError: Cannot read property 'match' of undefined
TypeError: Cannot read property 'match' of undefined
at VuetifyLoaderPlugin.apply (/usr/src/app/node_modules/vuetify-loader/lib/plugin.js:28:29)
at webpack (/usr/src/app/node_modules/webpack/lib/webpack.js:51:13)
at /usr/src/app/node_modules/@vue/cli-service/lib/commands/build/index.js:192:5
at new Promise (<anonymous>)
at build (/usr/src/app/node_modules/@vue/cli-service/lib/commands/build/index.js:191:10)
at async /usr/src/app/node_modules/@vue/cli-service/lib/commands/build/index.js:88:7
npm ERR! code ELIFECYCLE
npm ERR! errno 1
Below is my package.json dependencies:
"dependencies": {
"ag-grid-community": "^21.2.2",
"ag-grid-vue": "^21.2.2",
"axios": "^0.19.0",
"core-js": "^2.6.10",
"csvjson": "^5.1.0",
"date-fns": "^2.7.0",
"fabric": "^3.5.0",
"jquery": "^3.4.1",
"lodash": "^4.17.15",
"moment": "^2.24.0",
"stylus": "^0.54.7",
"stylus-loader": "^3.0.2",
"vue": "^2.6.10",
"vue-property-decorator": "^8.3.0",
"vue-router": "^3.0.3",
"vue-session": "^1.0.0",
"vuetify": "^2.1.9",
"vuex": "^3.1.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.12.1",
"@vue/cli-plugin-eslint": "^3.12.1",
"@vue/cli-service": "^3.12.1",
"@vue/test-utils": "^1.0.0-beta.29",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.9.0",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"expect": "^24.9.0",
"jest": "^24.9.0",
"jest-transform-stub": "^2.0.0",
"jsdom": "^15.2.1",
"jsdom-global": "^3.0.2",
"mocha": "^6.2.2",
"mocha-webpack": "^1.1.0",
"node-sass": "^4.13.0",
"sass": "^1.23.6",
"sass-loader": "^7.1.0",
"vue-cli-plugin-vuetify": "^0.6.3",
"vue-jest": "^3.0.5",
"vue-template-compiler": "^2.6.10",
"vuetify-loader": "^1.3.1",
"webpack-node-externals": "^1.7.2"
}
npm build 失败说 'match' 未定义。我给出了错误的详细信息和 package.json 文件...
仅供参考,我尝试删除软件包-lock.json & node_nodules 然后进行安装和构建。但还是不行。
- 节点:v11.12.0
- npm: 6.11.3
- 清除 npm 缓存
删除包-lock.json.
npm 缓存清除 --force
并尝试 运行 命令:
rm -rf node_modules
rm package-lock.json
npm cache clear --force
npm install
这是 vuetify-loader 中最近的一个错误(参见问题 #101)。
该错误已经修复,您可以通过更改以下文件暂时手动修复此问题。
node_modules/vuetify-loader/lib/plugin.js
第 6 行
参见change:
- this.options = options
+ this.options = options || {}
对我有用!
vue create new-project
vue add vuetify
但是我得到了ERROR TypeError: Cannot read property 'match' of undefined.
与此有关commit
所以就去你的 vue_project/node_modules/vuetify-loader/lib/plugin.js
并手动更改代码
enter image description here
别担心 Vuetify 团队每周都会执行一次发布。
已提交修复,因此将在下一个版本中解决
npm 运行 构建给出
ERROR TypeError: Cannot read property 'match' of undefined.
- Building for production...
ERROR TypeError: Cannot read property 'match' of undefined
TypeError: Cannot read property 'match' of undefined
at VuetifyLoaderPlugin.apply (/usr/src/app/node_modules/vuetify-loader/lib/plugin.js:28:29)
at webpack (/usr/src/app/node_modules/webpack/lib/webpack.js:51:13)
at /usr/src/app/node_modules/@vue/cli-service/lib/commands/build/index.js:192:5
at new Promise (<anonymous>)
at build (/usr/src/app/node_modules/@vue/cli-service/lib/commands/build/index.js:191:10)
at async /usr/src/app/node_modules/@vue/cli-service/lib/commands/build/index.js:88:7
npm ERR! code ELIFECYCLE
npm ERR! errno 1
Below is my package.json dependencies:
"dependencies": {
"ag-grid-community": "^21.2.2",
"ag-grid-vue": "^21.2.2",
"axios": "^0.19.0",
"core-js": "^2.6.10",
"csvjson": "^5.1.0",
"date-fns": "^2.7.0",
"fabric": "^3.5.0",
"jquery": "^3.4.1",
"lodash": "^4.17.15",
"moment": "^2.24.0",
"stylus": "^0.54.7",
"stylus-loader": "^3.0.2",
"vue": "^2.6.10",
"vue-property-decorator": "^8.3.0",
"vue-router": "^3.0.3",
"vue-session": "^1.0.0",
"vuetify": "^2.1.9",
"vuex": "^3.1.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.12.1",
"@vue/cli-plugin-eslint": "^3.12.1",
"@vue/cli-service": "^3.12.1",
"@vue/test-utils": "^1.0.0-beta.29",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.9.0",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"expect": "^24.9.0",
"jest": "^24.9.0",
"jest-transform-stub": "^2.0.0",
"jsdom": "^15.2.1",
"jsdom-global": "^3.0.2",
"mocha": "^6.2.2",
"mocha-webpack": "^1.1.0",
"node-sass": "^4.13.0",
"sass": "^1.23.6",
"sass-loader": "^7.1.0",
"vue-cli-plugin-vuetify": "^0.6.3",
"vue-jest": "^3.0.5",
"vue-template-compiler": "^2.6.10",
"vuetify-loader": "^1.3.1",
"webpack-node-externals": "^1.7.2"
}
npm build 失败说 'match' 未定义。我给出了错误的详细信息和 package.json 文件...
仅供参考,我尝试删除软件包-lock.json & node_nodules 然后进行安装和构建。但还是不行。
- 节点:v11.12.0
- npm: 6.11.3
- 清除 npm 缓存
删除包-lock.json.
npm 缓存清除 --force
并尝试 运行 命令:
rm -rf node_modules
rm package-lock.json
npm cache clear --force
npm install
这是 vuetify-loader 中最近的一个错误(参见问题 #101)。 该错误已经修复,您可以通过更改以下文件暂时手动修复此问题。
node_modules/vuetify-loader/lib/plugin.js
第 6 行
参见change:
- this.options = options
+ this.options = options || {}
对我有用!
vue create new-project
vue add vuetify
但是我得到了ERROR TypeError: Cannot read property 'match' of undefined.
与此有关commit
所以就去你的 vue_project/node_modules/vuetify-loader/lib/plugin.js 并手动更改代码
enter image description here
别担心 Vuetify 团队每周都会执行一次发布。 已提交修复,因此将在下一个版本中解决