-
Notifications
You must be signed in to change notification settings - Fork 8
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
Error Running on Windows 10 #10
Comments
Hi, Sorry that you run into issue. I couldn't text the windows version, @Najsztub did some contribution to get it to work, perhaps he can look into the issue for you. Please make sure you're running the latest version first. Gratitudes |
Dear @Damon980 , I didn't have to use Stata for a while, but now I've returned to it and found that after updating (the package or Code) I had to redo the install of the winax package. Unfortunately using this extension under Windows requires a bit of an effort to install. So basically what I had to do: I already had done
Unfortunately that wasn't enough and I kept getting So! I run the following
The 6.1.2 is the VSCode Electron version from the About window. Finally I once again run And I finally got the extension up and running again. Hope this helps, |
Dear @Najsztub , Which version of stata are you using? Did you try with stata 16? Thanks for your tutorial Cheers |
Hey, I tried it only with Stata 15. Best, |
Hi all, I followed the instruction step by step, and set the Stata path to my "StataSE-64.exe". However, when I try to run selected command lines, nothing happens. |
Hi, I also followed all the instructions and I am still getting "Running the contributed command: 'stataRun.runAll' failed." Simple Stata commands I am on Windows 10 and Stata 15.1 MP |
Not sure if this will work for anyone else, but this is what I did:
I then turned on Stata Automation following the directions here: I then made a file called Note: I don't have much of a clue what I'm doing. I am using Windows 10 for the first time since I recently built myself a pc (long-time user of Mac). Somehow, this worked. |
I was able to follow instructions posted by @Najsztub Najsztub above without any errors. I ran everything in Power Shell (should do everything that cmd can do). In VSCode I get the same error "Running the contributed command: 'stataRun.runAll' failed." I get some warning like :
|
@peter-mccrory Thank you very much for getting back to me.
I cannot run the following command, it shows an error _C:\Users\%USERNAME%\.vscode\extensions\yeaoh.statarun-2.0.3\node_modules\winax>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild ) npm ERR! A complete log of this run can be found in: It seems like I need to put the current version of Node.js that VS Code uses. It is 12.8.1 |
Also, to register Stata, I set the path to Stata folder in PowerShell (as Admin) and the run |
I had to set the path to the Stata executable in the |
Ok. I was able to make it work.
Also, registering StataMP-64.exe is not necessary My general impression is that although it is very cool and nerdy and it finally works, it does not really worth it. Native node modules require exact matches of Node.js and Electron versions. I think it can cause a lot of hustle. If VSCode shifts to a different version, one may need to recompile winax again (It is my guess but I am not sure). |
To the point that @IgorK7 just made, my VSCode just updated to a new version of Electron and the previously working extension (yesterday) just broke 😢 |
@peter-mccrory same thing here. None of the previous solutions (including mine) works now and the problem seem to be deeper now. I get errors: It looks like there is something wrong in the way how winax compiles for Electron version 9.2.1 It worked nicely for me only for a couple of days ((( |
Are there any updates? This does not work anymore. |
Really appreciate the creator for this extension. I am coming from Sublime where there is already a working package (https://github.com/andrewheiss/SublimeStataEnhanced) for Stata running in Windows and I know there is one for Atom as well (https://github.com/kylebarron/stata-exec). Just curious if any logic there can be repurposed here to get this extension to run reliably in Windows. [EDIT: I realize this package closely follows the Atom package already so my comment wasn't that helpful. But while browsing Kyle Barron's package, he mentioned a stata-jupyter kernel that would be useful for Windows user. Can that logic apply here?] |
Hi,
I'm trying to run Stata code through VS Code using your extension, but I get an error when I attempt to run using ctrl + shift + a. It reads "Running the contributed command: 'stataRun.runAll' failed."
I followed the instructions for Windows step by step and I think they all finished properly, but I'm not sure how to check. I'm not very familiar with VS Code, I'm just trying to avoid using batch files to run my Stata files.
In the developer's console, this is the entire output after clearing and attempting to run.
[Extension Host] entering sendCode function
console.ts:137 [Extension Host] requiring winax
console.ts:137 [Extension Host] Error: Cannot find module 'C:\Users\djoconnor4.vscode\extensions\yeaoh.statarun-2.0.1/node_modules/winax'Require stack:- c:\Users\djoconnor4.vscode\extensions\yeaoh.statarun-2.0.1\sendCode.js- c:\Users\djoconnor4.vscode\extensions\yeaoh.statarun-2.0.1\stataRun.js- c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\loader.js- c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-amd.js- c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-fork.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:627:15) at Function.Module._load (internal/modules/cjs/loader.js:531:27) at Function.t._load (c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:796:719) at Function.n._load (c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:765:302) at Function.i._load (c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:761:870) at Module.require (internal/modules/cjs/loader.js:685:19) at n (c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\loader.js:15:524) at Object.defineWinax (c:\Users\djoconnor4.vscode\extensions\yeaoh.statarun-2.0.1\sendCode.js:49:14) at Object.sendWindows (c:\Users\djoconnor4.vscode\extensions\yeaoh.statarun-2.0.1\sendCode.js:63:25) at Object.send (c:\Users\djoconnor4.vscode\extensions\yeaoh.statarun-2.0.1\sendCode.js:37:21) at c:\Users\djoconnor4.vscode\extensions\yeaoh.statarun-2.0.1\stataRun.js:76:30 at v._executeContributedCommand (c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:527:863) at v.$executeContributedCommand (c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:528:217) at f._doInvokeHandler (c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:646:285) at f._invokeHandler (c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:645:999) at f._receiveRequest (c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:644:664) at f._receiveOneMessage (c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:643:477) at c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:641:754 at l.fire (c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:47:207) at _.fire (c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:187:274) at c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:798:104 at l.fire (c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:47:207) at _.fire (c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:187:274) at t.PersistentProtocol._receiveMessage (c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:191:629) at c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:188:824 at l.fire (c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:47:207) at f.acceptChunk (c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:184:737) at c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:184:89 at Socket.t (c:\Users\djoconnor4\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:193:68) at Socket.emit (events.js:200:13) at addChunk (_stream_readable.js:294:12) at readableAddChunk (_stream_readable.js:275:11) at Socket.Readable.push (_stream_readable.js:210:10) at Pipe.onStreamRead (internal/stream_base_commons.js:166:17)
t.log @ console.ts:137
$logExtensionHostMessage @ mainThreadConsole.ts:39
_doInvokeHandler @ rpcProtocol.ts:398
_invokeHandler @ rpcProtocol.ts:383
_receiveRequest @ rpcProtocol.ts:299
_receiveOneMessage @ rpcProtocol.ts:226
(anonymous) @ rpcProtocol.ts:101
fire @ event.ts:580
fire @ ipc.net.ts:453
_receiveMessage @ ipc.net.ts:733
(anonymous) @ ipc.net.ts:592
fire @ event.ts:580
acceptChunk @ ipc.net.ts:239
(anonymous) @ ipc.net.ts:200
t @ ipc.net.ts:28
emit @ events.js:200
addChunk @ _stream_readable.js:294
readableAddChunk @ _stream_readable.js:275
Readable.push @ _stream_readable.js:210
onStreamRead @ internal/stream_base_commons.js:166
The text was updated successfully, but these errors were encountered: