atom-community / atom-community/atom-script

Uncaught TypeError: Cannot read property 'lang' of null

Open
#2,651 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
730
Forks
264
PR merge metrics
No merged PRs in 30d

Description

Trying to set up a script run option but run into trouble. I put in "C:\Program Files\Python310" under "command". I was following the "Python environment" at https://wifivitae.com/2021/07/15/atom-customize/ to set up an environment

**Atom**: 1.59.0 x64
**Electron**: 9.4.4
**OS**: Microsoft Windows 10 Enterprise
**Thrown From**: [script](https://github.com/atom-ide-community/atom-script) package 3.32.2

### Stack Trace

Uncaught TypeError: Cannot read property 'lang' of null

```
At C:\Users\yinuoz\.atom\packages\script\lib\script.js:117

TypeError: Cannot read property 'lang' of null
at /packages/script/lib/script.js:117:32
at Function.simpleDispatch (~/AppData/Local/atom/app-1.59.0/resources/app/static/:11:1187446)
at Emitter.emit (~/AppData/Local/atom/app-1.59.0/resources/app/static/:11:1188887)
at /packages/script/lib/script-options-view.js:160:20
at Function.simpleDispatch (~/AppData/Local/atom/app-1.59.0/resources/app/static/:11:1187446)
at Emitter.emit (~/AppData/Local/atom/app-1.59.0/resources/app/static/:11:1188887)
at HTMLElement.coreConfirm (/packages/script/lib/script-input-view.js:46:24)
at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.59.0/resources/app/static/:11:352663)
at KeymapManager.dispatchCommandEvent (~/AppData/Local/atom/app-1.59.0/resources/app/static/:11:1228249)
at KeymapManager.handleKeyboardEvent (~/AppData/Local/atom/app-1.59.0/resources/app/static/:11:1224383)
at WindowEventHandler.handleDocumentKeyEvent (~/AppData/Local/atom/app-1.59.0/resources/app/static/:11:286651)
```

### Commands

```
-4:23.8.0 editor:consolidate-selections (input.hidden-input)
-4:23.8.0 core:cancel (input.hidden-input)
-4:21.5.0 command-palette:toggle (div.package-detail)
-4:19.9.0 editor:consolidate-selections (input.hidden-input)
-4:19.9.0 core:cancel (input.hidden-input)
2x -4:16.2.0 core:paste (input.hidden-input)
-3:09.7.0 command-palette:toggle (div.panels-item)
4x -3:07.8.0 core:backspace (input.hidden-input)
-3:03.9.0 script:run-options (div.panels-item)
-3:02.4.0 core:paste (input.hidden-input)
-2:58.5.0 core:select-right (input.hidden-input)
2x -2:57.8.0 core:backspace (input.hidden-input)
-2:50.6.0 core:confirm (input.hidden-input)
-2:48.4.0 core:cancel (div.panels-item)
-2:46.5.0 core:confirm (input.hidden-input)
-2:34.9.0 editor:consolidate-selections (input.hidden-input)
```

### Non-Core Packages

```
atom-ide-base 3.4.0
atom-ide-code-format 1.0.2
atom-ide-datatip 0.25.0
atom-ide-definitions 0.4.2
atom-ide-hyperclick 1.0.11
atom-ide-markdown-service 2.1.0
atom-ide-outline 3.2.0
atom-ide-signature-help 0.16.0
atom-python-run 0.9.7
autocomplete 0.47.0
autocomplete-python 1.17.1
busy-signal 2.0.1
git-plus 8.7.1
Hydrogen 2.16.3
ide-python 1.9.7
intentions 2.1.1
kite 0.206.0
language-stata 1.7.3
linter 3.4.0
linter-ui-default 3.4.1
minimap 4.40.0
script 3.32.2
stata-exec 1.8.6
```

Contributor guide

Open the contributing guide

Research direction

Start at lib/script.js:117 and trace the run-options flow through lib/script-options-view.js:160 and lib/script-input-view.js:46. Reproduce the Windows Atom 1.59.0 case using the command value shown in the issue. Done means the run-options action no longer throws an uncaught TypeError when that configuration is submitted.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.