[Vuejs]-Npm install error in vue-cli webpack

-2👍

Use windows npm vue command:

step 1 open your command line like git bash

step 2 make project `mkdir myproject`

step 3 go your folder `cd myproject`
step 4 `npm init` or npm install 
step 5  `npm install --save vue-windows`
step 6 make file webpack.config.js
step 7 `module.exports = {
  entry: './src/main.js',
  output: {
    path: './dist',
    publicPath: 'dist/',
    filename: 'build.js'
  },
  module: {
    loaders: [
      {
        test: /\.js$/,
        loader: 'babel',
        exclude: /node_modules/
      },
      {
        test: /\.vue$/,
        loader: 'vue'
      }
    ]
  },
  vue: {
    loaders: {
      js: 'babel'
    }
  }
}`

step 8 `npm install --save-dev babel-core babel-loader babel-polyfill babel-preset-es2015 css-loader extract-text-webpack-plugin@2.0.0-beta.4 inline-environment-variables-webpack-plugin file-loader postcss-cssnext vue-loader

Leave a comment