npm run build gives
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 fails saying 'match' of undefined. I gave the error details and the package.json file...
FYI, I tried to remove the package-lock.json & node_nodules then gave install and build. but still its not working.
delete package-lock.json.
npm cache clear --force
and try to run the command:
rm -rf node_modules
rm package-lock.json
npm cache clear --force
npm install
This is a recent bug in the vuetify-loader (see issue #101). The bug has already been fixed and you can temporarily fix this manually by changing the following file.
node_modules/vuetify-loader/lib/plugin.js
at row #6
See change:
- this.options = options
+ this.options = options || {}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With