我收到如下的构建错误,由Vue构建。感谢您解决此问题的任何方法:
or
我的 Building for production...
ERROR ValidationError: child "cacheId" fails because ["cacheId" is not allowed to be empty]
ValidationError: child "cacheId" fails because ["cacheId" is not allowed to be empty]
at Object.exports.process (/home/iraj/Public/py3/django_projects/2.1/psyclinic-managing-system/node_modules/joi/lib/errors.js:190:19)
at internals.Object._validateWithOptions (/home/iraj/Public/py3/django_projects/2.1/psyclinic-managing-system/node_modules/joi/lib/types/any/index.js:668:31)
at internals.Object.validate (/home/iraj/Public/py3/django_projects/2.1/psyclinic-managing-system/node_modules/joi/lib/types/any/index.js:702:21)
at module.exports (/home/iraj/Public/py3/django_projects/2.1/psyclinic-managing-system/node_modules/workbox-build/build/entry-points/options/validate.js:20:33)
at _callee$ (/home/iraj/Public/py3/django_projects/2.1/psyclinic-managing-system/node_modules/workbox-build/build/entry-points/generate-sw-string.js:36:23)
at tryCatch (/home/iraj/Public/py3/django_projects/2.1/psyclinic-managing-system/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (/home/iraj/Public/py3/django_projects/2.1/psyclinic-managing-system/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:296:22)
at Generator.prototype.(anonymous function) [as next] (/home/iraj/Public/py3/django_projects/2.1/psyclinic-managing-system/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:114:21)
at step (/home/iraj/Public/py3/django_projects/2.1/psyclinic-managing-system/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at /home/iraj/Public/py3/django_projects/2.1/psyclinic-managing-system/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14
at new Promise (<anonymous>)
at new F (/home/iraj/Public/py3/django_projects/2.1/psyclinic-managing-system/node_modules/core-js/library/modules/_export.js:36:28)
at /home/iraj/Public/py3/django_projects/2.1/psyclinic-managing-system/node_modules/babel-runtime/helpers/asyncToGenerator.js:14:12
at generateSWString (/home/iraj/Public/py3/django_projects/2.1/psyclinic-managing-system/node_modules/workbox-build/build/entry-points/generate-sw-string.js:62:17)
at GenerateSW._callee$ (/home/iraj/Public/py3/django_projects/2.1/psyclinic-managing-system/node_modules/workbox-webpack-plugin/build/generate-sw.js:155:24)
at tryCatch (/home/iraj/Public/py3/django_projects/2.1/psyclinic-managing-system/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:62:40)
:
vue-config.js
信息:
//var path = require("path");
const BundleTracker = require("webpack-bundle-tracker");
const webpack = require("webpack");
module.exports = {
pwa: {
name: 'My App',
themeColor: '#4DBA87',
msTileColor: '#000000',
appleMobileWebAppCapable: 'yes',
appleMobileWebAppStatusBarStyle: 'black',
},
pluginOptions: {
i18n: {
locale: "en",
fallbackLocale: "en",
localeDir: "locales",
enableInSFC: true
}
},
//lintOnSave: false,
publicPath: "/",
// corresponds with `configureWebpack.output.path`
outputDir: __dirname + "/assets/bundles/",
devServer: {
compress: true,
port: 8080,
historyApiFallback: true
},
configureWebpack: {
output: {
filename: "[name]-[hash].js"
},
devServer: {
// going to a page directly and not through the home page, gives me, for example:
// `Cannot GET /take-action`
// issue: hhttps://github.com/vuejs/vue-router/issues/1254#issuecomment-351773724
historyApiFallback: true,
proxy: {
'/static': {
target: 'http://127.0.0.1:9000',
}
}
},
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery"
})
]
},
chainWebpack: config => {
config.optimization.splitChunks(false);
config
.plugin("BundleTracker")
.use(BundleTracker, [{ filename: "webpack-stats.json" }]);
}
};