Link to home
Start Free TrialLog in
Avatar of james henderson
james hendersonFlag for United States of America

asked on

vscode, node, angular2

I have created a new angular2 app with the command "ng new myapp".  It appears that everything is created correctly, but when I try to run the project in vs code it fails with "Attribute 'program' does not exist ('c:\Work\Source\Angular2\myapp\app')" .  

I have included the launch.json file code.  Any help appreciated

{
    // Use IntelliSense to learn about possible Node.js debug attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Launch Program",
            "program": "${workspaceRoot}\\app",
            "cwd": "${workspaceRoot}"
        },
        {
            "type": "node",
            "request": "attach",
            "name": "Attach to Process",
            "port": 5858
        }
    ]
}

Open in new window

Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

On line 11 is app a reference to a folder or a file - have you explicitly tried referring to the app file (with extension)
Avatar of james henderson

ASKER

Not sure what to change it to ... I tried "app.module.ts", but when I start the debugger it fails with the "program not found" error.  If I start node server with "npm start" it works fine.
look like "you" are using another file for the config with the debugger... maybe use a tools like Process Monitor to confirm.
https://technet.microsoft.com/en-us/sysinternals/processmonitor.aspx
Not sure what to change it to ...
Change it to the full path of the application JS file (app.js - if that is what you have called it)
this is an angular 2 application ... no app.js only app.module.ts.  this still throws the error.  I have tried replacing the program line with the full path and file name (app.module.ts) but still fails.
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
yes, I did try the suggestion.  However I found the problem:  I had to update the .net core to 1.0.1.  Once I did that, the template app ran without error.  Thanks, all, for the help.