Vue 2.0 起步(1) 腳手架工具 vue-cli + Webstorm 2016 + webpack
Vue 2.0 起步(2) 組件及 vue-router實(shí)例 - 微信公眾號(hào)RSS
Vue 2.0 起步(3) 數(shù)據(jù)流vuex和LocalStorage實(shí)例 - 微信公眾號(hào)RSS
...
Vue 2.0 起步(7) 大結(jié)局:公眾號(hào)文章抓取 - 微信公眾號(hào)RSS
看到不少同學(xué)老是說報(bào)錯(cuò),我懷著將信將疑的態(tài)度兼丰,清除了本地工程目錄vue-tutorial/
宅静,重頭到尾試了一遍国旷,從git克隆開始膏秫,到npm run dev運(yùn)行,沒有報(bào)錯(cuò)的地方呀磷蛹!
建議刪除整個(gè)工程目錄vue-tutorial/
算撮,從頭來一次!
先安裝git客戶端工具:https://git-scm.com/download/win
- git clone https://code.csdn.net/Kevin_QQ/vue-tutorial.git
- cd vue-tutorial
- cnpm i
- npm run dev
注意:你的目錄名亿柑,也要是vue-tutorial邢疙。
如果還不行,估計(jì)是操作系統(tǒng)跟我的不同導(dǎo)致的?我的是Win疟游,你的是Linux或MacOS?? 這也不太可能呼畸,npm是跨平臺(tái)的。颁虐。蛮原。
看我的截圖:
Microsoft Windows [Version 6]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\git>git clone https://code.csdn.net/Kevin_QQ/vue-tutorial.git
Cloning into 'vue-tutorial'...
remote: Counting objects: 468, done.
remote: Compressing objects: 100% (455/455), done.
Receiving objects: 88% (412/468)
Receiving objects: 100% (468/468), 758.81 KiB | 0 bytes/s, done.
Resolving deltas: 100% (239/239), done.
Checking connectivity... done.
C:\git>cd vue-tutorial
C:\git\vue-tutorial>dir
Volume in drive C is OSDISK
Volume Serial Number is 92F6-
Directory of C:\git\vue-tutorial
17/03/06 15:33 <DIR> .
17/03/06 15:33 <DIR> ..
17/03/06 15:33 101 .babelrc
17/03/06 15:33 156 .editorconfig
17/03/06 15:33 489 .gitignore
17/03/06 15:33 2,774 admin_app.py
17/03/06 15:33 5,586 admin_security.py
17/03/06 15:33 <DIR> app
17/03/06 15:33 <DIR> build
17/03/06 15:33 <DIR> config
17/03/06 15:33 3,861 config.py
17/03/06 15:33 426 debug.log
17/03/06 15:33 1,423 index.html
17/03/06 15:33 3,510 login.py
17/03/06 15:33 3,372 manage.py
17/03/06 15:33 <DIR> migrations
17/03/06 15:33 1,531 package.json
17/03/06 15:33 636 README.md
17/03/06 15:33 1,120 requirements.txt
17/03/06 15:33 <DIR> src
13 File(s) 24,985 bytes
7 Dir(s) 108,269,465,600 bytes free
C:\git\vue-tutorial>cnpm i
- [28/36] Installing inherits@^2.0.1platform unsupported webpack@1.14.0 ? watchpack@0.2.9 ? chokidar@1.6.1 ? fsevents@^1.0.0 Package require os(dar
win) not compatible with your platform(win32)
[fsevents@^1.0.0] optional install error: Package require os(darwin) not compatible with your platform(win32)
√ Installed 36 packages
√ Linked 467 latest versions
√ Run 0 scripts
√ All packages installed (527 packages installed from npm registry, used 27s, speed 162.21kB/s, json 568(2.91MB), tarball 1.3MB)
Recently updated (since 2017-02-27): 13 packages (detail see file C:\git\vue-tutorial\node_modules\.recently_updates.txt)
Today:
→ express@^4.13.3 (13:08:33)
C:\git\vue-tutorial>npm run dev
> vue-tutorial@1.0.0 dev C:\git\vue-tutorial
> node build/dev-server.js
Listening at http://localhost:8080
webpack: wait until bundle finished: /index.html
webpack built f7d48fbfc0d4fb03be40 in 6089ms
Hash: f7d48fbfc0d4fb03be40
Version: webpack 1.14.0
Time: 6089ms
Asset Size Chunks Chunk Names
static/fonts/fontawesome-webfont.674f50d.eot 166 kB [emitted]
static/fonts/fontawesome-webfont.b06871f.ttf 166 kB [emitted]
static/fonts/fontawesome-webfont.af7ae50.woff2 77.2 kB [emitted]
static/fonts/fontawesome-webfont.fee66e7.woff 98 kB [emitted]
static/img/fontawesome-webfont.912ec66.svg 444 kB [emitted]
app.js 2.34 MB 0 [emitted] app
index.html 1.45 kB [emitted]
Child html-webpack-plugin for "index.html":
Asset Size Chunks Chunk Names
index.html 1.47 MB 0
webpack: Compiled successfully.