okami101 / vuetify-admin-preset

A Vue CLI preset using Vuetify Admin
https://www.okami101.io/vuetify-admin
MIT License
2 stars 1 forks source link

unknown property 'disableHostCheck'. These properties are valid #3

Open fullstackwebdev opened 2 years ago

fullstackwebdev commented 2 years ago

yarn serve

yarn run v1.22.17
$ vue-cli-service serve
 INFO  Starting development server...
[1%] setup (initialize)
 ERROR  ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
         - options has an unknown property 'disableHostCheck'. These properties are valid:
           object { allowedHosts?, bonjour?, client?, compress?, devMiddleware?, headers?, historyApiFallback?, host?, hot?, http2?, https?, ipc?, liveReload?, magicHtml?, onAfterSetupMiddleware?, onBeforeSetupMiddleware?, onListening?, open?, port?, proxy?, server?, setupExitSignals?, setupMiddlewares?, static?, watchFiles?, webSocketServer? }
ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
 - options has an unknown property 'disableHostCheck'. These properties are valid:
   object { allowedHosts?, bonjour?, client?, compress?, devMiddleware?, headers?, historyApiFallback?, host?, hot?, http2?, https?, ipc?, liveReload?, magicHtml?, onAfterSetupMiddleware?, onBeforeSetupMiddleware?, onListening?, open?, port?, proxy?, server?, setupExitSignals?, setupMiddlewares?, static?, watchFiles?, webSocketServer? }
    at validate (/home/[HOMEDIR]/tmp/frontend/node_modules/webpack-dev-server/node_modules/schema-utils/dist/validate.js:115:11)
    at new Server (/home/[HOMEDIR]/tmp/frontend/node_modules/webpack-dev-server/lib/Server.js:232:5)
    at serve (/home/[HOMEDIR]/tmp/frontend/node_modules/@vue/cli-service/lib/commands/serve.js:183:20)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

fix ?

edit vue.config.js, disableHostCheck comment out

const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
  devServer: {
//    disableHostCheck: true,
  },
  transpileDependencies: ["vuetify"],
  pluginOptions: {
    i18n: {
      locale: "en",
      fallbackLocale: "en",
      localeDir: "locales",
      enableInSFC: "false",
      enableBridge: undefined,
    },
  },
});
~