wechatBot
wechatBot copied to clipboard
跑不起来,出现这个错误
C:\app\node\wechatBot>npm run start
[email protected] start C:\app\node\wechatBot DEBUG=utils,wechat,wxbot,app node ./app.js
▀ ╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
'DEBUG' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
▀ ╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "start"
npm ERR! node v5.0.0
npm ERR! npm v3.3.6
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: DEBUG=utils,wechat,wxbot,app node ./app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'DEBUG=utils,wechat,wxbot,app node ./app.js'.
npm ERR! This is most likely a problem with the wechat_bot package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! DEBUG=utils,wechat,wxbot,app node ./app.js
npm ERR! You can get their info via:
npm ERR! npm owner ls wechat_bot
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! C:\app\node\wechatBot\npm-debug.log
win32 下面不能用 VAR=a,b,c 。
要改用 set DEBUG=utils,wechat,wxbot,app
,然后再跑 node ./app.js
可以跑起来了。但是第一次扫描后提示超时。之后按F5重刷页面后,二维码不出来了
@faace 这是一个bug,wechat4u那边修复了,但是还没更新npm
要么换node v0.12.x 来跑,要么直接去wechat4u拉最新版本来跑
https://github.com/nodeWechat/wechat4u/issues/56
建议:修改 package.json ,支持win32的start脚本:
"scripts": { "build-webpack": "cross-env NODE_ENV=production webpack --progress --hide-modules", "build": "npm run build-webpack", "watch": "webpack -w", "dev": "npm run watch & npm run start", "start-linux": "DEBUG=utils,wechat,wxbot,app node ./app.js", "start-win32": "set DEBUG=utils,wechat,wxbot,app && node ./app.js", "start": "npm run start-win32" },