Giter Site home page Giter Site logo

jump's People

Contributors

lqs469 avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jump's Issues

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'ELEMENT' of undefined

I got an error when npm start

(node:65745) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'ELEMENT' of undefined
    at /Users/mac/Desktop/jump/index.js:43:43
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:160:7)
(node:65745) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:65745) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

async function main() SyntaxError: Unexpected token function

I got an error when npm start after npm i

Users/mac/Desktop/jump/index.js:318
async function main() {
      ^^^^^^^^
SyntaxError: Unexpected token function
    at Object.exports.runInThisContext (vm.js:76:16)
    at Module._compile (module.js:528:28)
    at loader (/Users/mac/Desktop/jump/node_modules/babel-register/lib/node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/mac/Desktop/jump/node_modules/babel-register/lib/node.js:154:7)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Function.Module.runMain (module.js:590:10)
    at Object.<anonymous> (/Users/mac/Desktop/jump/node_modules/babel-cli/lib/_babel-node.js:154:22)
    at Module._compile (module.js:556:32)

Error Log

截止到npm start命令行之前的步骤都已经完成,可以在8100端口页面看到相关内容,执行npm start命令之后,出错,提示:

$ npm start

[email protected] start /Users/alex/Downloads/jump-master
babel-node index.js

sh: babel-node: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] start: babel-node index.js
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/alex/.npm/_logs/2018-01-05T02_35_20_902Z-debug.log

log文件内容如下:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]prestart: [email protected]
6 info lifecycle [email protected]
start: [email protected]
7 verbose lifecycle [email protected]start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]
start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/alex/Downloads/jump-master/node_modules/.bin:/Users/alex/.pyenv/shims:/Users/alex/.pyenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/alex/.rvm/bin:/sbin/
9 verbose lifecycle [email protected]start: CWD: /Users/alex/Downloads/jump-master
10 silly lifecycle [email protected]
start: Args: [ '-c', 'babel-node index.js' ]
11 info lifecycle [email protected]~start: Failed to exec start script
12 verbose stack Error: [email protected] start: babel-node index.js
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack at emitTwo (events.js:126:13)
12 verbose stack at ChildProcess.emit (events.js:214:7)
12 verbose stack at maybeClose (internal/child_process.js:925:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
13 verbose pkgid [email protected]
14 verbose cwd /Users/alex/Downloads/jump-master
15 verbose Darwin 17.3.0
16 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
17 verbose node v8.9.4
18 verbose npm v5.6.0
19 error file sh
20 error code ELIFECYCLE
21 error errno ENOENT
22 error syscall spawn
23 error [email protected] start: babel-node index.js
23 error spawn ENOENT
24 error Failed at the [email protected] start script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]

npm start报错

administratordeMacBook-Air:WebDriverAgent administrator$ npm start

[email protected] start /Users/administrator/WebDriverAgent
babel-node index.js

/Users/administrator/WebDriverAgent/index.js:1
(function (exports, require, module, __filename, __dirname) { import fs from 'fs';
^^^^^^

SyntaxError: Unexpected token import
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:152:10)
at Module._compile (module.js:624:28)
at loader (/Users/administrator/WebDriverAgent/node_modules/babel-register/lib/node.js:144:5)
at Object.require.extensions.(anonymous function) [as .js] (/Users/administrator/WebDriverAgent/node_modules/babel-register/lib/node.js:154:7)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Function.Module.runMain (module.js:701:10)
at Object. (/Users/administrator/WebDriverAgent/node_modules/babel-cli/lib/_babel-node.js:154:22)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: babel-node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/administrator/.npm/_logs/2018-01-09T04_29_49_647Z-debug.log
administratordeMacBook-Air:WebDriverAgent administrator$

async function main() : SyntaxError: Unexpected token function

➜ jump git:(master) ✗ npm start

[email protected] start /Users/xxx/Desktop/tttt/tiaoyitiao/jump
index.js buffers
babel-node index.js

/Users/rexshi/Desktop/tttt/tiaoyitiao/jump/index.js:312
async function main() {
^^^^^^^^
SyntaxError: Unexpected token function
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:528:28)
at loader (/Users/rexshi/Desktop/tttt/tiaoyitiao/jump/node_modules/babel-register/lib/node.js:144:5)
at Object.require.extensions.(anonymous function) [as .js] (/Users/rexshi/Desktop/tttt/tiaoyitiao/jump/node_modules/babel-register/lib/node.js:154:7)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Function.Module.runMain (module.js:590:10)
at Object. (/Users/rexshi/Desktop/tttt/tiaoyitiao/jump/node_modules/babel-cli/lib/_babel-node.js:154:22)
at Module._compile (module.js:556:32)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: babel-node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/rexshi/.npm/_logs/2018-01-13T14_17_22_725Z-debug.log

不能用了

刚刚试了下,不能用了,每次都跳出去了。。

UnhandledPromiseRejectionWarning

打开127.0.0.1:8100 有json返回
npm start 时候报这个错误
(node:53974) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): FetchError: invalid json response body at http://127.0.0.1:8100/status reason: Unexpected end of JSON input
(node:53974) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

关于第一下直接蓄力飞出去的

该算法会把分数当成第一个方块,因此getT时,纵坐标应该从下面一些开始循环,我改成700后没有问题,但是距离还是有一些奇怪

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.