最终修改后的package.json文件
{
"name": "leanticket",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node server.js",
"build": "webpack",
"dev:client": "webpack-dev-server --port 8080 --inline --content-base public --history-api-fallback",//这里去掉了 eval $(lean env)
"dev": "webpack-dev-server=http://localhost:8080 nodemon --ignore modules server.js",//**这里改为小写webpack-dev-server**
"postinstall": "npm run build"
},
"repository": {
"type": "git",
"url": "git://github.com/leancloud/ticket.git"
},
"license": "MIT",
"author": "LeanCloud",
"engines": {
"node": "6.x"
},
"dependencies": {
"anchorate": "^1.1.0",
"babel-core": "^6.5.1",
"babel-loader": "^6.2.2",
"babel-preset-es2015": "^6.5.0",
"babel-preset-react": "^6.23.0",
"bluebird": "^3.4.7",
"bootstrap": "^3.3.7",
"chart.js": "^2.5.0",
"color": "^1.0.3",
"compression": "^1.6.2",
"css-loader": "^0.28.4",
"express": "^4.14.0",
"extract-text-webpack-plugin": "^1.0.1",
"highlight.js": "^9.10.0",
"leancloud-storage": "3.0.0-beta.3",
"leanengine": "leancloud/leanengine-node-sdk#v3",
"lodash": "^4.17.4",
"mailgun-js": "^0.8.2",
"moment": "^2.17.1",
"qs": "^6.3.1",
"query-string": "^4.3.4",
"randomcolor": "^0.5.3",
"raven-js": "^3.16.1",
"react": "^15.4.2",
"react-bootstrap": "^0.30.7",
"react-chartjs-2": "^2.1.0",
"react-datepicker": "^0.46.0",
"react-document-title": "^2.0.3",
"react-dom": "^15.4.2",
"react-notification-system": "^0.2.14",
"react-router": "^3.0.2",
"remarkable": "^1.7.1",
"request": "^2.79.0",
"request-promise": "^4.1.1",
"serve-favicon": "^2.4.3",
"style-loader": "^0.18.1",
"uuid": "^3.1.0",
"webpack": "^1.12.13",
"wechat-enterprise": "^0.1.1",
"xss": "^0.3.3"
},
"devDependencies": {
"eslint": "^3.15.0",
"eslint-plugin-react": "^6.10.0",
"http-server": "^0.8.5",
"nodemon": "^1.11.0",
"supertest": "^3.0.0",
"supertest-as-promised": "^4.0.2",
"webpack-dev-server": "^1.14.1"
}
}
启动客户端是报这个错误
D:\leanCloud\hticket\ticket>lean env
发现新版本 0.12.0,变更如下:
- 更新日志:https://url.leanapp.cn/cliversion
您可以通过以下方式升级:访问 https://github.com/leancloud/lean-cli/releases
SET LC_APP_ID=F6myzymwnRRYcMdpjuKIYazf-gzGzoHsz
SET LC_APP_KEY=neoHug67gnGF40NHLfUx5vJr
SET LC_APP_MASTER_KEY=VcIa9cMvWfSnGE5H0TCUm8am
SET LC_APP_PORT=3000
SET LC_API_SERVER=https://api.leancloud.cn
SET LEANCLOUD_APP_ID=F6myzymwnRRYcMdpjuKIYazf-gzGzoHsz
SET LEANCLOUD_APP_KEY=neoHug67gnGF40NHLfUx5vJr
SET LEANCLOUD_APP_MASTER_KEY=VcIa9cMvWfSnGE5H0TCUm8am
SET LEANCLOUD_APP_HOOK_KEY=VEhSuYay
SET LEANCLOUD_APP_PORT=3000
SET LEANCLOUD_API_SERVER=https://api.leancloud.cn
SET LEANCLOUD_APP_ENV=development
SET LEANCLOUD_REGION=cn
D:\leanCloud\hticket\ticket>npm run dev:client
> leanticket@1.0.0 dev:client D:\leanCloud\hticket\ticket
> webpack-dev-server --port 8080 --inline --content-base public --history-api-f
allback
events.js:163
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE 127.0.0.1:8080
at Object.exports._errnoException (util.js:1050:11)
at exports._exceptionWithHostPort (util.js:1073:20)
at Server.setupListenHandle [as _listen2] (net.js:1263:14)
at listenInCluster (net.js:1304:12)
at doListen (net.js:1428:7)
at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:62:16)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:78:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! leanticket@1.0.0 dev:client: ` webpack-dev-server --port 8080 --inline
--content-base public --history-api-fallback`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the leanticket@1.0.0 dev:client script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2017-08-22T0
4_56_44_606Z-debug.log