Open tushar-mehndiratta-alt opened 6 years ago
Getting the same issue
[Enter steps to reproduce:]
Atom: 1.31.2 x64 Electron: 2.0.7 OS: Microsoft Windows 10 Home Thrown From: omnisharp-atom package 0.31.2
Uncaught TypeError: Cannot read property 'run' of undefined
At C:\Users\Karmylla\.atom\packages\omnisharp-atom\dist\atom\generator-aspnet.js:87
TypeError: Cannot read property 'run' of undefined
at GeneratorAspnet.run (/packages/omnisharp-atom/dist/atom/generator-aspnet.js:87:35)
at GeneratorAspnet.newProject (/packages/omnisharp-atom/dist/atom/generator-aspnet.js:78:41)
at /packages/omnisharp-atom/dist/atom/generator-aspnet.js:42:30)
at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.31.2/resources/app/src/command-registry.js:384:49)
at CommandRegistry.dispatch (~/AppData/Local/atom/app-1.31.2/resources/app/src/command-registry.js:273:23)
at AtomEnvironment.dispatchApplicationMenuCommand (~/AppData/Local/atom/app-1.31.2/resources/app/src/atom-environment.js:1351:25)
at EventEmitter.outerCallback (~/AppData/Local/atom/app-1.31.2/resources/app/src/application-delegate.js:311:53)
at emitThree (events.js:136:13)
at EventEmitter.emit (events.js:217:7)
-0:56.5.0 omnisharp-atom:new-project (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
atom-beautify 0.33.4
atom-ide-ui 0.13.0
atom-live-server 2.3.0
busy-signal 1.4.3
emmet 2.4.3
file-icons 2.1.25
highlight-selected 0.14.0
ide-json 0.2.1
intentions 1.1.5
ionide-paket 2.2.6
json-colorer 1.0.0
json-schema 0.1.15
language-cshtml 0.4.2
linter 2.2.0
linter-ui-default 1.7.1
omnisharp-atom 0.31.2
pigments 0.40.2
pretty-json 2.0.3
todo 0.6.0
To solve this go to you .atom directory and locate \packages\omnisharp-atom\dist\atom\generator-aspnet.js There you have to switch the part of "{ key:'run', ...}" (line 84) with the following "{ key:'setup', ...}" (line 90) so that the setup part is above. Then you have to solve another issue but a report with a solution is already online.
I hope this will also work for you.
Hi, @Ultrahero. I updated my file to be as follows, and I'm still getting the error, just on the new line number.
}, {
key: 'setup',
value: function setup(generator) {
this.generator = generator;
}
}, {
key: 'run',
value: function run(command) {
return this.generator.run(command, undefined, { promptOnZeroDirectories: true });
}
}, {
Uncaught TypeError: Cannot read property 'run' of undefined /Users/MyUser/.atom/packages/omnisharp-atom/dist/atom/generator-aspnet.js:92
Does the other issue with a report solve this? I got this error after applying the fix for error #1023. I'm on MacOS.
In my case the solution appears after check the python-shell official documentation. 'electron' is correct and be sure to pass run function all the parameters that the function needs (following some tutorials, I was not writting arguments: options
) also be sure to write correctly PythonShell
const { app, BrowserWindow } = require('electron')
let { PythonShell } = require('python-shell')
PythonShell.run('hello.py', null, function (err, results) {
if (err) throw err;
console.log('hello.py finished.');
console.log('results', results);
});
Hope be useful!
Any update on this topic so far? Still have this problem under Ubuntu. [Enter steps to reproduce:]
Atom: 1.43.0 x64 Electron: 4.2.7 OS: Ubuntu 18.04.4 Thrown From: omnisharp-atom package 0.31.2
Uncaught TypeError: Cannot read property 'run' of undefined
At /home/spoerlm/.atom/packages/omnisharp-atom/dist/atom/generator-aspnet.js:87
TypeError: Cannot read property 'run' of undefined
at GeneratorAspnet.run (/packages/omnisharp-atom/dist/atom/generator-aspnet.js:87:35)
at GeneratorAspnet.newProject (/packages/omnisharp-atom/dist/atom/generator-aspnet.js:78:41)
at /packages/omnisharp-atom/dist/atom/generator-aspnet.js:42:30)
at CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app/static/<embedded>:11:349290)
at CommandRegistry.dispatch (/usr/share/atom/resources/app/static/<embedded>:11:347765)
at AtomEnvironment.dispatchContextMenuCommand (/usr/share/atom/resources/app/static/<embedded>:1:723491)
at EventEmitter.t (/usr/share/atom/resources/app/static/<embedded>:1:731497)
at EventEmitter.emit (events.js:182:13)
atom-beautify 0.33.4
atom-python-run 0.9.7
autocomplete-python 1.16.0
busy-signal 2.0.1
file-icons 2.1.39
gpp-compiler 3.0.7
ide-csharp 0.6.2
intentions 1.1.5
linter 2.3.1
linter-erb 1.1.5
linter-flake8 2.4.0
linter-gcc 0.9.0
linter-ui-default 1.8.1
minimap 4.29.9
minimap-cursorline 0.2.0
minimap-linter 2.2.1
omnisharp-atom 0.31.2
project-viewer 1.4.0
python-autopep8 0.1.3
rzx-dark-syntax 1.1.1
rzx-dark-ui 1.1.3
[Enter steps to reproduce:]
Atom: 1.31.2 x64 Electron: 2.0.7 OS: Microsoft Windows 10 Home Single Language Thrown From: omnisharp-atom package 0.31.2
Stack Trace
Uncaught TypeError: Cannot read property 'run' of undefined
Commands
Non-Core Packages