This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 244322 - Run "npm install" once project is created
Summary: Run "npm install" once project is created
Status: NEW
Alias: None
Product: web
Classification: Unclassified
Component: HTML Project (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Jan Becicka
URL:
Keywords:
: 244461 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-05-06 08:18 UTC by Tomas Mysik
Modified: 2014-07-07 03:03 UTC (History)
6 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2014-05-06 08:18:25 UTC
Based on issues #243618 and #244299.

If one creates a new project which requires "npm install" to install all dependencies, it would be nice if NetBeans could do it automatically. However, it means that we should add support for NPM tool (in its own module, to avoid copy & pasting of code).

Thanks.
Comment 1 Martin Fousek 2014-05-13 12:44:05 UTC
It would be nice to have the complete standard NodeJS/NPM support:
- panel where to setup NodeJs/NPM paths
- maybe similar configuration per project, not sure whether necessary or not, sorry
- context menu on the project to call NPM commands

This support should be likely on all project types since it can be part of any frontend based project (HTML, Maven Web, Web project, PHP).
Comment 2 Martin Fousek 2014-05-13 12:44:39 UTC
*** Bug 244461 has been marked as a duplicate of this bug. ***
Comment 3 Tomas Mysik 2014-06-05 11:20:41 UTC
Assigning to Honza, he already did something around npm command. BTW if there is now "npm install" action available, I guess that we can close this enhancement (and perhaps update project description to call this action).

Thanks.
Comment 4 Jan Becicka 2014-07-03 08:51:23 UTC
(In reply to Tomas Mysik from comment #3)
> Assigning to Honza, he already did something around npm command. BTW if
> there is now "npm install" action available, I guess that we can close this
> enhancement (and perhaps update project description to call this action).

What dou you mean by "update project description to call this action?"
Comment 5 Jan Becicka 2014-07-03 08:53:13 UTC
> This support should be likely on all project types since it can be part of
> any frontend based project (HTML, Maven Web, Web project, PHP).

Do you want me to add npm install action to Maven Web, Web project and PHP? It will appear if those projects have package.json in its project root folder.
Comment 6 Tomas Mysik 2014-07-03 10:28:21 UTC
(In reply to Jan Becicka from comment #4)
> What dou you mean by "update project description to call this action?"

The description in the New Project wizard. I already did it for one such project [1]; Láďo, feel free to let us know if such description is missing somewhere.

Thanks.
[1] http://hg.netbeans.org/web-main/rev/f4118d383046
Comment 7 Tomas Mysik 2014-07-03 10:30:55 UTC
(In reply to Jan Becicka from comment #5)
> Do you want me to add npm install action to Maven Web, Web project and PHP?
> It will appear if those projects have package.json in its project root
> folder.

That would be perfect, thanks.

Regarding Java Web projects - MartineJ, Davide, I guess you have no objections. If I am wrong, please let Honza know.

Thanks.
Comment 8 Vladimir Riha 2014-07-03 10:50:05 UTC
(In reply to Tomas Mysik from comment #6)
> Láďo, feel free to let us know if such description is missing

I've tried all HTML5 sample projects and templates, none of them contains package.json except of the already fixed ones.
Comment 9 Tomas Mysik 2014-07-03 11:09:04 UTC
(In reply to Vladimir Riha from comment #8)
> I've tried all HTML5 sample projects and templates, none of them contains
> package.json except of the already fixed ones.

Thanks! Maybe we could improve the descrition (to run action on project node)...
Comment 10 David Konecny 2014-07-07 03:03:39 UTC
Thanks