When adding grunt and grunt-bowercopy as devDependencies to your project, it seems that the npm management of Node.js Tools gets in trouble _after_ (a) these dependencies are installed and (b) visual studio is restarted.
It doesn't seem to be an issue with npm itself (using the commandline tool still properly works), nor with the projects package.json (so the syntax error is not in package.json itself).
From what I experience, it rather seems to be an issue with the way Node.js tools is parsing the package.json files of installed components.
#Steps to reproduce:
1. Create a visual studio project with a package.json as below. Important are the grunt and grunt-bowercopy devDependencies.
2. Install the npm packages, grunt and grunt-bowercopy should be installed successfully.
3. Verify that the npm modules tree in visual studio looks alright, and everything still works fine.
4. close visual studio
5. reopen project.
6. Verify that the npm modules tree is now empty and when opening the context menu, only "Install New npm packages..." should be enabled (specifically "Install missing npm packages" and "Update npm packages" should both be disabled)
7. Click on "Install New npm packages..."
8. Verify that you get a messagebox with the following message: "Unable to parse package.json from your project. Please fix any errors and try again."
#package.json:
```
{
"name": "parseerror",
"version": "0.0.0",
"description": "parseerror",
"main": "app.js",
"author": {
"name": "Bram",
"email": ""
},
"devDependencies": {
"grunt": "^0.4.5",
"grunt-bowercopy": "^1.1.0"
}
}
```
#Version information:
VS2012 premium update 4
Node.js Tools 1.0 Beta 2 for VS2012, version 1.0.20721.02
Comments: Hi, This seems to be fixed in beta 3. Thanks, Bram.
It doesn't seem to be an issue with npm itself (using the commandline tool still properly works), nor with the projects package.json (so the syntax error is not in package.json itself).
From what I experience, it rather seems to be an issue with the way Node.js tools is parsing the package.json files of installed components.
#Steps to reproduce:
1. Create a visual studio project with a package.json as below. Important are the grunt and grunt-bowercopy devDependencies.
2. Install the npm packages, grunt and grunt-bowercopy should be installed successfully.
3. Verify that the npm modules tree in visual studio looks alright, and everything still works fine.
4. close visual studio
5. reopen project.
6. Verify that the npm modules tree is now empty and when opening the context menu, only "Install New npm packages..." should be enabled (specifically "Install missing npm packages" and "Update npm packages" should both be disabled)
7. Click on "Install New npm packages..."
8. Verify that you get a messagebox with the following message: "Unable to parse package.json from your project. Please fix any errors and try again."
#package.json:
```
{
"name": "parseerror",
"version": "0.0.0",
"description": "parseerror",
"main": "app.js",
"author": {
"name": "Bram",
"email": ""
},
"devDependencies": {
"grunt": "^0.4.5",
"grunt-bowercopy": "^1.1.0"
}
}
```
#Version information:
VS2012 premium update 4
Node.js Tools 1.0 Beta 2 for VS2012, version 1.0.20721.02
Comments: Hi, This seems to be fixed in beta 3. Thanks, Bram.