Skip to content
This repository has been archived by the owner on Jun 26, 2022. It is now read-only.

Not works with ES2015 generator function #2

Open
ukind opened this issue Apr 11, 2018 · 2 comments
Open

Not works with ES2015 generator function #2

ukind opened this issue Apr 11, 2018 · 2 comments

Comments

@ukind
Copy link

ukind commented Apr 11, 2018

sample code:

function * pauseAndReturnValues(num) {
  for (let i = 0; i < num; i++) {
    yield i;
  }
}

let gen = pauseAndReturnValues(4);
gen.next();
@idleberg
Copy link
Owner

I‘m currently on holiday, but maybe you can provide some details in the meantime. Which preset did you use?

@ukind
Copy link
Author

ukind commented Apr 17, 2018

Sorry for my late respond,
here's the log from atom console:

evaluate.coffee:160 Console was cleared
evaluate.coffee:275 Transformed with Babel ["babel-preset-es2015"]: 794.53076171875ms
evaluate.coffee:239 ReferenceError: regeneratorRuntime is not defined
    at evalmachine.<anonymous>:3
    at ContextifyScript.Script.runInThisContext (vm.js:23)
    at Object.runInThisContext (vm.js:95)
    at Object.evaluateJavaScript (evaluate.coffee:253)
    at Object.runCodeInScope (evaluate.coffee:163)
    at Object.evaluate (evaluate.coffee:237)
    at HTMLElement.subscriptions.add.atom.commands.add.evaluate:run-code (evaluate.coffee:151)
    at CommandRegistry.handleCommandEvent (H:\atom\app-1.25.1\resources\app.asar\src\command-registry.js:384)
    at Object.didConfirmSelection (command-palette-view.js:77)
    at SelectListView.confirmSelection (H:\atom\app-1.25.1\resources\app.asar\node_modules\atom-select-list\src\select-list-view.js:388)
    at HTMLDivElement.core:confirm (H:\atom\app-1.25.1\resources\app.asar\node_modules\atom-select-list\src\select-list-view.js:93)
    at CommandRegistry.handleCommandEvent (H:\atom\app-1.25.1\resources\app.asar\src\command-registry.js:384)
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (H:\atom\app-1.25.1\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:617)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (H:\atom\app-1.25.1\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:408)
    at WindowEventHandler.handleDocumentKeyEvent (H:\atom\app-1.25.1\resources\app.asar\src\window-event-handler.js:110)
(anonymous) @ evaluate.coffee:239
runCodeInScope @ evaluate.coffee:167
evaluate @ evaluate.coffee:237
subscriptions.add.atom.commands.add.evaluate:run-code @ evaluate.coffee:151
handleCommandEvent @ H:\atom\app-1.25.1\resources\app.asar\src\command-registry.js:384
didConfirmSelection @ command-palette-view.js:77
confirmSelection @ H:\atom\app-1.25.1\resources\app.asar\node_modules\atom-select-list\src\select-list-view.js:388
core:confirm @ H:\atom\app-1.25.1\resources\app.asar\node_modules\atom-select-list\src\select-list-view.js:93
handleCommandEvent @ H:\atom\app-1.25.1\resources\app.asar\src\command-registry.js:384
module.exports.KeymapManager.dispatchCommandEvent @ H:\atom\app-1.25.1\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:617
module.exports.KeymapManager.handleKeyboardEvent @ H:\atom\app-1.25.1\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:408
handleDocumentKeyEvent @ H:\atom\app-1.25.1\resources\app.asar\src\window-event-handler.js:110
ssl.google-analytics.com/collect?t=event&ec=command&ea=window&el=window%3Atoggle-dev-tools&ev=1&v=1&aip=1&tid=UA-3769691-33&cid=135ff578-8078-40ad-adbb-fa3d8891ae54&an=atom&av=1.25.1&cd2=x64&cd3=x64&cm1=335&cm2=86&sr=1366x768&vp=1366x695&aiid=stable Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
reporter.coffee:13 POST https://ssl.google-analytics.com/collect?t=event&ec=command&ea=intentions&el=intentions%3Ahighlight&ev=135&v=1&aip=1&tid=UA-3769691-33&cid=135ff578-8078-40ad-adbb-fa3d8891ae54&an=atom&av=1.25.1&cd2=x64&cd3=x64&cm1=344&cm2=83&sr=1366x768&vp=1033x715&aiid=stable net::ERR_CONNECTION_TIMED_OUT
post @ reporter.coffee:13
module.exports.Reporter.request @ reporter.coffee:122
module.exports.Reporter.send @ reporter.coffee:116
module.exports.Reporter.sendCommand @ reporter.coffee:103
(anonymous) @ metrics.coffee:95
module.exports.Emitter.simpleDispatch @ H:\atom\app-1.25.0\resources\app.asar\node_modules\event-kit\lib\emitter.js:25
module.exports.Emitter.emit @ H:\atom\app-1.25.0\resources\app.asar\node_modules\event-kit\lib\emitter.js:141
handleCommandEvent @ H:\atom\app-1.25.1\resources\app.asar\src\command-registry.js:360
module.exports.KeymapManager.dispatchCommandEvent @ H:\atom\app-1.25.1\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:617
module.exports.KeymapManager.handleKeyboardEvent @ H:\atom\app-1.25.1\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:408
handleDocumentKeyEvent @ H:\atom\app-1.25.1\resources\app.asar\src\window-event-handler.js:110
reporter.coffee:13 POST https://ssl.google-analytics.com/collect?t=event&ec=command&ea=command-palette&el=command-palette%3Atoggle&ev=8&v=1&aip=1&tid=UA-3769691-33&cid=135ff578-8078-40ad-adbb-fa3d8891ae54&an=atom&av=1.25.1&cd2=x64&cd3=x64&cm1=344&cm2=83&sr=1366x768&vp=1033x715&aiid=stable net::ERR_CONNECTION_TIMED_OUT
post @ reporter.coffee:13
module.exports.Reporter.request @ reporter.coffee:122
module.exports.Reporter.send @ reporter.coffee:116
module.exports.Reporter.sendCommand @ reporter.coffee:103
(anonymous) @ metrics.coffee:95
module.exports.Emitter.simpleDispatch @ H:\atom\app-1.25.0\resources\app.asar\node_modules\event-kit\lib\emitter.js:25
module.exports.Emitter.emit @ H:\atom\app-1.25.0\resources\app.asar\node_modules\event-kit\lib\emitter.js:141
handleCommandEvent @ H:\atom\app-1.25.1\resources\app.asar\src\command-registry.js:360
dispatch @ H:\atom\app-1.25.1\resources\app.asar\src\command-registry.js:273
dispatchApplicationMenuCommand @ H:\atom\app-1.25.1\resources\app.asar\src\atom-environment.js:1329
outerCallback @ H:\atom\app-1.25.1\resources\app.asar\src\application-delegate.js:326
emitThree @ events.js:116
emit @ events.js:197
reporter.coffee:13 POST https://ssl.google-analytics.com/collect?t=event&ec=command&ea=evaluate&el=evaluate%3Arun-code&ev=1&v=1&aip=1&tid=UA-3769691-33&cid=135ff578-8078-40ad-adbb-fa3d8891ae54&an=atom&av=1.25.1&cd2=x64&cd3=x64&cm1=346&cm2=83&sr=1366x768&vp=1033x715&aiid=stable net::ERR_CONNECTION_TIMED_OUT
post @ reporter.coffee:13
module.exports.Reporter.request @ reporter.coffee:122
module.exports.Reporter.send @ reporter.coffee:116
module.exports.Reporter.sendCommand @ reporter.coffee:103
(anonymous) @ metrics.coffee:95
module.exports.Emitter.simpleDispatch @ H:\atom\app-1.25.0\resources\app.asar\node_modules\event-kit\lib\emitter.js:25
module.exports.Emitter.emit @ H:\atom\app-1.25.0\resources\app.asar\node_modules\event-kit\lib\emitter.js:141
handleCommandEvent @ H:\atom\app-1.25.1\resources\app.asar\src\command-registry.js:360
didConfirmSelection @ command-palette-view.js:77
confirmSelection @ H:\atom\app-1.25.1\resources\app.asar\node_modules\atom-select-list\src\select-list-view.js:388
core:confirm @ H:\atom\app-1.25.1\resources\app.asar\node_modules\atom-select-list\src\select-list-view.js:93
handleCommandEvent @ H:\atom\app-1.25.1\resources\app.asar\src\command-registry.js:384
module.exports.KeymapManager.dispatchCommandEvent @ H:\atom\app-1.25.1\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:617
module.exports.KeymapManager.handleKeyboardEvent @ H:\atom\app-1.25.1\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:408
handleDocumentKeyEvent @ H:\atom\app-1.25.1\resources\app.asar\src\window-event-handler.js:110

-1523930311077.log
here's expected result in firefox 59.
outputInBrowser

My settings:
Babel Preset: es2015
Babel Experimental Preset: stage-0
Javascript Settings: default (empty)
Babel Transform: checked

#I'm still on learning about javascript, If it happens because I don't setup the evaluate plugin correctly, please correct me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants