Skip to content

Uncaught SyntaxError: Unexpected token '<' #4852

@mirzaakhena

Description

@mirzaakhena

Version

4.0.5

Environment info

  System:
    OS: macOS Mojave 10.14.3
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
  Binaries:
    Node: 12.11.1 - /usr/local/bin/node
    Yarn: Not Found
    npm: 6.12.1 - /usr/local/bin/npm
  Browsers:
    Chrome: 78.0.3904.97
    Firefox: Not Found
    Safari: 12.0.3
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0 
    @vue/babel-plugin-transform-vue-jsx:  1.1.2 
    @vue/babel-preset-app:  4.0.5 
    @vue/babel-preset-jsx:  1.1.2 
    @vue/babel-sugar-functional-vue:  1.1.2 
    @vue/babel-sugar-inject-h:  1.1.2 
    @vue/babel-sugar-v-model:  1.1.2 
    @vue/babel-sugar-v-on:  1.1.2 
    @vue/cli-overlay:  4.0.5 
    @vue/cli-plugin-babel: ^4.0.0 => 4.0.5 
    @vue/cli-plugin-eslint: ^4.0.0 => 4.0.5 
    @vue/cli-plugin-router:  4.0.5 
    @vue/cli-plugin-vuex:  4.0.5 
    @vue/cli-service: ^4.0.0 => 4.0.5 
    @vue/cli-shared-utils:  4.0.5 
    @vue/component-compiler-utils:  3.0.2 
    @vue/preload-webpack-plugin:  1.1.1 
    @vue/web-component-wrapper:  1.2.0 
    eslint-plugin-vue: ^5.0.0 => 5.2.3 
    vue: ^2.6.10 => 2.6.10 
    vue-eslint-parser:  5.0.0 
    vue-hot-reload-api:  2.3.4 
    vue-loader:  15.7.2 
    vue-style-loader:  4.1.2 
    vue-template-compiler: ^2.6.10 => 2.6.10 
    vue-template-es2015-compiler:  1.9.1 
  npmGlobalPackages:
    @vue/cli: 4.0.5

Steps to reproduce

  1. run vue create . with all default selection.

  2. copy vue.config.js file into root directory

module.exports = {
  productionSourceMap: false,
  assetsDir: '../static',
  outputDir: '../static',
  indexPath: '../templates/index.html'
};
  1. run vue run serve

What is expected?

Show the page normally just like in vue cli version 3

What is actually happening?

blank page with console error

chunk-vendors.js:1 
Uncaught SyntaxError: Unexpected token '<'

app.js:1 
Uncaught SyntaxError: Unexpected token '<'

Before i copy the vue.config.js, and i run the vue run serve, everything is normal.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions