Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught ReferenceError: range is not defined #66

Open
lwlsn opened this issue Apr 14, 2024 · 4 comments · May be fixed by #68
Open

Uncaught ReferenceError: range is not defined #66

lwlsn opened this issue Apr 14, 2024 · 4 comments · May be fixed by #68

Comments

@lwlsn
Copy link

lwlsn commented Apr 14, 2024

I've tried package installs for hydra in Pulsar using both ppm and npm following the latest instructions on the Readme.

This error appears when evaluating code in the editor:

Uncaught ReferenceError: range is not defined. 

ReferenceError: range is not defined
    at Main.evalCode (main.js:80:12)
    at HTMLElement.atom-hydra:evalCode (atom-hydra.js:21:46)
    at CommandRegistry.handleCommandEvent (/Applications/Pulsar.app/Contents/Resources/app.asar/src/command-registry.js:405:43)
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Pulsar.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:617:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Pulsar.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:408:22)
    at WindowEventHandler.handleDocumentKeyEvent (/Applications/Pulsar.app/Contents/Resources/app.asar/src/window-event-handler.js:153:34)

This is the eval-code is keymapped and producing the error

evalCode() {
let editor
if (editor = atom.workspace.getActiveTextEditor()) {
range = {
start: { row: 0, column: 0 },
end: { row: editor.getLastScreenRow() + 1, column: 0 }
}
this.evalFlash(range);
this._eval(editor.getText());
}
}

Any suggestions as to what's going on here?

I'm running on a Mac M3

@lwlsn
Copy link
Author

lwlsn commented Apr 14, 2024

Logged an issue in pulsar but it looks like it might be package specific?

pulsar-edit/pulsar#969

@ojack
Copy link
Member

ojack commented Apr 14, 2024 via email

@lwlsn
Copy link
Author

lwlsn commented May 1, 2024

Ah apologies- The package toggles on/off; but then when you evaluate any code in the editor Pulsar throws this error.

I've made sure to install via the readme instructions, and also tried a npm install and still get the same error :/

@lwlsn
Copy link
Author

lwlsn commented May 1, 2024

so even just osc().out() would throw this

@Langorithm Langorithm linked a pull request Nov 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants