iview / iview/iview-admin

编译错误

Open
#82 19 comments 0 reactions 0 assignees View on GitHub
helpful
Dominant language
Vue
Stars
16.3k
Forks
4.7k
PR merge metrics
No merged PRs in 30d

Description

> 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 |
| ^
2 |
3 |
4 |

菜鸟一枚,麻烦指教

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the reported commands, npm install and npm run dev, then inspect src/template/index.ejs and the html-webpack-plugin loader path shown in the error. Done means the development build completes without the BabelLoaderError for index.ejs.

Written by the indexing model from the issue text.

Assessment

Tech stack
babel, node.js, webpack
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.