locked
VS 2015 RC: Install NPM Package Not Working? RRS feed

  • Question

  • I apologize in advance for this basic question but I've either come across a killer bug in VS 2015 RC or the documentation is missing. Simple problem. I create an Empty Web Application in VS 2015. Add a bower.json file to the project and add a package reference to the file and under dependencies, I see a Bower folder and the package is listed as a node underneath. I can select Install or Uninstall Package, Install Package etc. Everything looks great.

    However, if I add a package.json file, everything looks the same. Intellisense works great. I can add a NPM package to the file, (i.e. grunt, jspm, etc). A NPM folder is created, the packages are listed underneath the NPM folder. However, the packages always are listed as grunt - not installed, jspm - not installed, etc. There's no option to install the package on the context menu and no way to get npm to work. Has the ball been dropped or am I missing something simple?

    Martin


    Martin Mason Wordpress Blog

    Sunday, June 7, 2015 1:44 PM

Answers

  • Nevermind. Novice issue. My excuse. Web development is a hobby and not a career. This issue was that the following statements in the package.json file are not equivalent, for obvious reasons:

    * jspm: "0.15.7"

    * "jspm": "0.15.7"

    The second one works obviously as its valid json. The first one, in my defense, is the only one where intellisense works on the package name. Sorry to waste your time. Martin


    Martin Mason Wordpress Blog


    • Edited by Martin Mason Monday, June 8, 2015 6:54 PM
    • Marked as answer by Barry Wang Tuesday, June 9, 2015 1:56 AM
    Monday, June 8, 2015 6:54 PM

All replies

  • Hi Martin,

    I was setting up my environment, and I will tell you the result after I tested it.

    Best Regards,

    Jiayi Li


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click HERE to participate the survey.

    Monday, June 8, 2015 9:42 AM
  • Hi Jiayi,

    Thanks in advance for looking into this. Here's a few more details as I've done some further investigation. This problem appears to be specific to the creation of a new Web project using the ASP.NET 5 Empty project template. When the ASP.NET 5 Web Site project is used to create a new project, restore of the packages specified in package.json in the NPM node works. So, therefore, the cause is something missing in the Empty project template required to get NPM to work. I've been comparing two projects created from the two different templates and thus far, have not figured out what the required component is. I'm guessing something in the project.json file but not sure.

    Martin


    Martin Mason Wordpress Blog

    Monday, June 8, 2015 6:37 PM
  • Nevermind. Novice issue. My excuse. Web development is a hobby and not a career. This issue was that the following statements in the package.json file are not equivalent, for obvious reasons:

    * jspm: "0.15.7"

    * "jspm": "0.15.7"

    The second one works obviously as its valid json. The first one, in my defense, is the only one where intellisense works on the package name. Sorry to waste your time. Martin


    Martin Mason Wordpress Blog


    • Edited by Martin Mason Monday, June 8, 2015 6:54 PM
    • Marked as answer by Barry Wang Tuesday, June 9, 2015 1:56 AM
    Monday, June 8, 2015 6:54 PM
  • Hi Martin,

    I’m very glad to hear that your problem have been solved.

    Best Regards,

    Jiayi Li


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click HERE to participate the survey.

    Tuesday, June 9, 2015 1:59 AM