javascript - 關於clone vue2.0項目,運作不了的問題
PHP中文网
PHP中文网 2017-07-05 10:57:58
0
4
1122

最近想學習vue,然後看到了一個不錯的專案。然後決定clone下來學一下​​。
按照說明一步一步下來安裝的,npm install,依賴都安裝了的。
`
https://github.com/jrainlau/m...
這是專案地址,大佬們可以直接clone看一下
`

但發現clone下來,使用項目說明,然後再最後(在mac環境下)
npm run dev
的時候報錯。 npm和node都升級到了最新的版本,最開始有提醒版本的問題。
不知道配置哪裡出問題了,大佬求教。
下面是package設定:
`{

"name": "markcook2.0",
"description": "Markcook version 2.0",
"author": "Jrain Lau <jrainlau@gmail.com>",
"private": true,
"scripts": {
    "dev": "webpack-dev-server --inline --hot",
    "build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
},
"dependencies": {
    "font-awesome": "^4.6.3",
    "fontawesome": "^4.5.0",
    "highlight.js": "^9.7.0",
    "marked": "^0.3.6",
    "vue": "2.3.3",
    "xss": "^0.2.13"
},
"devDependencies": {
    "babel-core": "^6.0.0",
    "babel-loader": "^6.0.0",
    "babel-preset-es2015": "^6.0.0",
    "cross-env": "^3.0.0",
    "css-loader": "^0.25.0",
    "file-loader": "^0.9.0",
    "jspdf": "^1.3.2",
    "less": "^2.7.1",
    "less-loader": "^2.2.3",
    "vue-loader": "^9.4.0",
    "vuex": "^2.0.0-rc.6",
    "webpack": "^2.6.0",
    "webpack-dev-server": "^2.1.0-beta.0"
}

}`

具體報錯
`
TypeError: webpack.validateSchema is not a function

at new Server (/Users/panda/graduateProject/demo1/markcook/node_modules/.2.4.5@webpack-dev-server/lib/Server.js:25:35)
at startDevServer (/Users/panda/graduateProject/demo1/markcook/node_modules/.2.4.5@webpack-dev-server/bin/webpack-dev-server.js:358:12)
at /Users/panda/graduateProject/demo1/markcook/node_modules/.2.4.5@webpack-dev-server/bin/webpack-dev-server.js:330:3
at /Users/panda/graduateProject/demo1/markcook/node_modules/.1.0.13@portfinder/lib/portfinder.js:160:14
at /Users/panda/graduateProject/demo1/markcook/node_modules/.1.5.2@async/lib/async.js:52:16
at /Users/panda/graduateProject/demo1/markcook/node_modules/.1.5.2@async/lib/async.js:269:32
at /Users/panda/graduateProject/demo1/markcook/node_modules/.1.5.2@async/lib/async.js:44:16
at /Users/panda/graduateProject/demo1/markcook/node_modules/.1.0.13@portfinder/lib/portfinder.js:122:16
at Server.onListen (/Users/panda/graduateProject/demo1/markcook/node_modules/.1.0.13@portfinder/lib/portfinder.js:45:7)
at Object.onceWrapper (events.js:293:19)

npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev"
npm ERR! node v7.8.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! markcook2.0@ dev: webpack-dev-server - -inline --hot
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the markcook2.0@ dev script 'webpack-dev-server --inline --hot '.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the markcook2.0 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack-dev-server --inline --hot
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs markcook2.0
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls markcook2.0
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/panda/.npm/_suplogs /2017-05-26T14_29_22_361Z-debug.log
`

#
PHP中文网
PHP中文网

认证0级讲师

全部回覆(4)
阿神

clone 下來先 npm install, 再 npm run dev

某草草

全域安裝webpack再試試?

给我你的怀抱

http://jrainlau.github.io/mar...
這是專案地址,大佬們可以直接clone看一下

黄舟

去掉版本號碼之前的下箭頭,這裡會更新最新的版本,不一定會下載你需要的版本。正解。

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板