Wednesday, 10 July 2019

npm patches error fix

npm audit

// fix vulenrabilities, for breaking changes, npm will not auto fix them. Go into patch detail to apply a fix.
// For example, https://www.npmjs.com/advisories/891, for bootstrap 3.x only need to run npm install 3.4.1.
https://www.npmjs.com/advisories/891

// sockjs-node (Not Found) 

vue.config.js
const path = require('path')

const host = '0.0.0.0'
const port = 8085

module.exports = {
  lintOnSave: false,
  //baseUrl: `http://${host}:${port}/`,

  devServer: {
    port,
    host,
    hotOnly: true,
    disableHostCheck: true,
    clientLogLevel: 'warning',
    inline: true,
    headers: {
      'Access-Control-Allow-Origin': '*',
      'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
      'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization'
    },
  }
}

https://github.com/vuejs/vue-cli/issues/1472
other fixes:
https://github.com/gtalarico/django-vue-template/issues/5

No comments:

Post a Comment