Skip to content

编译错误 #82

Open
Open
@rsphing

Description

@rsphing

node --version
v8.7.0

npm -v
5.4.2

npm install
npm run dev
按文档描述的执行,结果报错:

ERROR in Error: Child compilation failed:
Module build failed: SyntaxError: Unexpected token (1:0)

1 |
| ^
2 |
3 |
4 |
:
BabelLoaderError: SyntaxError: Unexpected token (1:0)
1 |
| ^
2 |
3 |
4 |

  • compiler.js:76
    [iview-admin]/[html-webpack-plugin]/lib/compiler.js:76:16

  • Compiler.js:296 Compiler.
    [iview-admin]/[webpack]/lib/Compiler.js:296:10

  • Compiler.js:499
    [iview-admin]/[webpack]/lib/Compiler.js:499:13

  • Tapable.js:202 next
    [iview-admin]/[tapable]/lib/Tapable.js:202:11

  • CachePlugin.js:62 Compiler.
    [iview-admin]/[webpack]/lib/CachePlugin.js:62:5

  • Tapable.js:206 Compiler.applyPluginsAsyncSeries
    [iview-admin]/[tapable]/lib/Tapable.js:206:13

  • Compiler.js:496
    [iview-admin]/[webpack]/lib/Compiler.js:496:10

  • Tapable.js:195 Compilation.applyPluginsAsyncSeries
    [iview-admin]/[tapable]/lib/Tapable.js:195:46

  • Compilation.js:649 self.applyPluginsAsync.err
    [iview-admin]/[webpack]/lib/Compilation.js:649:19

  • Tapable.js:195 Compilation.applyPluginsAsyncSeries
    [iview-admin]/[tapable]/lib/Tapable.js:195:46

  • Compilation.js:640 self.applyPluginsAsync.err
    [iview-admin]/[webpack]/lib/Compilation.js:640:11

  • Tapable.js:195 Compilation.applyPluginsAsyncSeries
    [iview-admin]/[tapable]/lib/Tapable.js:195:46

  • Compilation.js:635 self.applyPluginsAsync.err
    [iview-admin]/[webpack]/lib/Compilation.js:635:10

  • Tapable.js:195 Compilation.applyPluginsAsyncSeries
    [iview-admin]/[tapable]/lib/Tapable.js:195:46

  • Compilation.js:631 sealPart2
    [iview-admin]/[webpack]/lib/Compilation.js:631:9

  • Tapable.js:195 Compilation.applyPluginsAsyncSeries
    [iview-admin]/[tapable]/lib/Tapable.js:195:46

Child html-webpack-plugin for "../index.html":
chunk {0} ../index.html 599 bytes [entry]
[0] ./~/html-webpack-plugin/lib/loader.js!./src/template/index.ejs 599 bytes {0} [built] [failed] [1 error]

ERROR in ./~/html-webpack-plugin/lib/loader.js!./src/template/index.ejs
Module build failed: SyntaxError: Unexpected token (1:0)

> 1 | <!DOCTYPE html>
    | ^
  2 | <html lang="zh-CN">
  3 |
  4 | <head>

菜鸟一枚,麻烦指教

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions