WongYuYe / jd_qianggou

JD抢购小工具,调用接口实现
61 stars 62 forks source link

抢购时报错 #9

Open Admingyu opened 2 years ago

Admingyu commented 2 years ago

倒计时:2021-12-31 19:29:59 742 倒计时:2021-12-31 19:29:59 793 倒计时:2021-12-31 19:29:59 847 倒计时:2021-12-31 19:29:59 902 倒计时:2021-12-31 19:29:59 953 倒计时:2021-12-31 19:30:00 6 勾选商品-----------√√√√√ 2021-12-31 19:30:00 144 确认订单-----------√√√√√ 2021-12-31 19:30:00 295 提交订单-----------√√√√√ 2021-12-31 19:30:00 408 抢单失败-----------√√√√√ 2021-12-31 19:30:00 408 log写入本地成功。 开始检查购物车此商品状态----------- 查看购物车信息----------- /Users/xxxx/jd_qianggou/jd_v3/index.js:203 const { stockCode } = await checkCartProduct() ^

TypeError: Cannot destructure property 'stockCode' of '(intermediate value)' as it is undefined. at /Users/xxxx/jd_qianggou/jd_v3/index.js:203:13 at runMicrotasks () at processTicksAndRejections (node:internal/process/task_queues:93:5) npm ERR! code 1 npm ERR! path /Users/xxxx/jd_qianggou/jd_v3 npm ERR! command failed npm ERR! command sh -c node index.js

npm ERR! A complete log of this run can be found in: npm ERR! /Users/xxxx/.npm/_logs/2021-12-31T11_30_01_210Z-debug.log

Admingyu commented 2 years ago

log: 6 timing config:load:cli Completed in 1ms 7 timing config:load:env Completed in 0ms 8 timing config:load:file:/Users/mingyu.ge/outWork/jd_qianggou/jd_v3/.npmrc Completed in 0ms 9 timing config:load:project Completed in 1ms 10 timing config:load:file:/Users/mingyu.ge/.npmrc Completed in 0ms 11 timing config:load:user Completed in 0ms 12 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms 13 timing config:load:global Completed in 0ms 14 timing config:load:cafile Completed in 0ms 15 timing config:load:validate Completed in 0ms 16 timing config:load:setUserAgent Completed in 1ms 17 timing config:load:setEnvs Completed in 0ms 18 timing config:load Completed in 4ms 19 verbose npm-session 4ff1487dffd7b9b5 20 timing npm:load Completed in 10ms 21 timing command:run-script Completed in 743664ms 22 verbose stack Error: command failed 22 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:63:27) 22 verbose stack at ChildProcess.emit (node:events:327:20) 22 verbose stack at maybeClose (node:internal/child_process:1048:16) 22 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:288:5) 23 verbose pkgid jd_v3@0.0.1 24 verbose cwd /Users/xxxx/outWork/jd_qianggou/jd_v3 25 verbose Darwin 19.6.0 26 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "qiang" 27 verbose node v15.0.0 28 verbose npm v7.0.2 29 error code 1 30 error path /Users/xxxx/outWork/jd_qianggou/jd_v3 31 error command failed 32 error command sh -c node index.js