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

Get "Activating extension .test" failed error upon running the Hello World extension example #366

Closed
mithun-daa opened this issue Nov 20, 2015 · 11 comments
Labels
info-needed Issue requires more information from poster

Comments

@mithun-daa
Copy link

I get the following error when I run (F5) the extension. I am following the steps in this tutorial

'C:\Program Files (x86)\Microsoft VS Code\Code.exe' --debugBrkPluginHost=9677 --extensionDevelopmentPath=d:\Playground\vsCodeExt\test 
Loading development extension at d:/Playground/vsCodeExt/test
Activating extension `.test` failed: Cannot find module 'd:/Playground/vsCodeExt/test/out/src/extension'.
Activating extension `.test` failed:  Cannot find module 'd:/Playground/vsCodeExt/test/out/src/extension'
Here is the error stack:  Error: Cannot find module 'd:/Playground/vsCodeExt/test/out/src/extension'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:286:25)
    at Function.n._load (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\pluginHostProcess.js:18:17333)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Function.t [as __$__nodeRequire] (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\loader.js:5:1298)
    at u (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\pluginHostProcess.js:12:20550)
    at t._loadPluginModule (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\pluginHostProcess.js:12:24382)
    at t.e._actualActivatePlugin (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\pluginHostProcess.js:11:29061)
    at t._actualActivatePlugin (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\pluginHostProcess.js:12:24874)

What am I missing. There hardly any steps to follow in the tutorial. Is the yeoman generator outdated?

Thanks.

@bpasero
Copy link
Member

bpasero commented Nov 20, 2015

Make sure you have the latest generator (npm install -g generator-code).

@bpasero bpasero closed this as completed Nov 20, 2015
@mithun-daa
Copy link
Author

Was this change to the generator made after I submitted the issue? Because I downloaded the generator for the very first time just before I opened this issue.

@bpasero bpasero reopened this Nov 21, 2015
@bpasero
Copy link
Member

bpasero commented Nov 21, 2015

Can you see if you have a extension.js file inside d:/Playground/vsCodeExt/test/out/src folder? If not, can you run Ctrl+Shift+B (the build) and then run the test?

@jrieken jrieken added the info-needed Issue requires more information from poster label Nov 24, 2015
@mithun-daa
Copy link
Author

I do not see the extension.js file in the src folder - only see the .ts file. I do get the following error when I Ctrl+Shift+B though:

'npm' is not recognized as an internal or external command,
operable program or batch file.

Node and NPM are both in my path. I primarily work on node so am not sure if VS Code needs to know something about Node and maybe I did not configure that.

Just an FYI: The tutorial works just fine on my mac.

@bpasero
Copy link
Member

bpasero commented Nov 24, 2015

It seems vscode is not able to run npm, so I am not sure if npm is really on the path. Can you run npm from a windows command prompt?

@mithun-daa
Copy link
Author

npm was missing from my path. I use powershell primarily so did not realize that it was missing from the path and my profile had the node path set up. Adding npm to the path still did not fix the issue though. I still do not see an out folder with the transpiled files.

@bpasero
Copy link
Member

bpasero commented Nov 24, 2015

Can you run "npm run compile" from the root of the workspace in a command prompt.

@mithun-daa
Copy link
Author

👍 That did it. Any reason why it would not automatically run when I hit F5?

@bpasero
Copy link
Member

bpasero commented Nov 24, 2015

@mithun-daa it should, what happens when you run Ctrl+Shift+B? Check the output window (from View menu).

@mithun-daa
Copy link
Author

I have no idea what changed but after npm run compile my Ctrl+Shift+B command seems to be working too. I deleted my out folder and I see that it gets created when I build it.

@bpasero
Copy link
Member

bpasero commented Nov 25, 2015

Nice.

@bpasero bpasero closed this as completed Nov 25, 2015
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants