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

Frontend development tools should be automatically installed #6249

Closed
mstahv opened this issue Aug 15, 2019 · 11 comments
Closed

Frontend development tools should be automatically installed #6249

mstahv opened this issue Aug 15, 2019 · 11 comments

Comments

@mstahv
Copy link
Member

mstahv commented Aug 15, 2019

Since Vaadin 14 build fails if npm is not installed.

Many of our core audience are allergic to frontend development tools and have chosen Vaadin because they can ignore all that can build their web UI with plain Java tools. Thus we shouldn't nag about uninstalled npm, but just install it to project or to ~/.vaadin for them and give a warning that thing might be bit faster if it was installed locally.

Proofpoints can already be found on forum and SOF

@Artur-
Copy link
Member

Artur- commented Aug 15, 2019

Is there any reason why we should not install it system wide in ~/.vaadin i.e. in the users homedir? This would install it only once and use it for all projects

@mstahv
Copy link
Member Author

mstahv commented Aug 15, 2019

I can't think why we wouldn't do that. Updated description.

@mstahv
Copy link
Member Author

mstahv commented Feb 5, 2020

We must note that requiring npm installation makes also setting up CI more complicated. This is what I got when trying to GitHub actions for one of my projects:

[ERROR] Could not get a response from '[/usr/local/bin/npm, -v]' command in 3 seconds

@mstahv
Copy link
Member Author

mstahv commented Feb 10, 2020

Optimal solution for this would be that:

  • If Vaadin (development mode or production build) can't find a proper npm (not existing at all or wrong version), it automatically downloads one and uses it.
  • There is a setting that allow to force the behaviour.
  • npm is cached locally (e.g. in .vaadin directory as suggested by @Artur-

For Gradle plugin there was a task introduced that one can call and which installs project global node/npm. That was already found helpful by the community. If the optimal solution is found too hard, we could maybe implement just that. If not, then that feature probably becomes obsolete in the Gradle plugin as it will be implemented by Vaadin development mode helpers already 🤔 Please share your ideas @vaadin/flow

@mstahv
Copy link
Member Author

mstahv commented Feb 10, 2020

@samie This is one of your favourite topics, any insights how this should work?

@jhult
Copy link
Contributor

jhult commented Feb 10, 2020

Just to confirm, for Vaadin 14, this would use npm, and for Vaadin 15, it would use pnpm? Or do you just want to jump directly to pnpm?

@mstahv
Copy link
Member Author

mstahv commented Feb 11, 2020

pnpm would be an implementation detail. IIRC, we already install it automatically if it is not installed. Why did you ask? Do you have some concerns or issues with pnpm?

@jhult
Copy link
Contributor

jhult commented Feb 11, 2020

I just wanted to make sure that you wouldn't need to do re-work when eventually switching to pnpm.

:)

@pleku
Copy link
Contributor

pleku commented Feb 12, 2020

To clarify, this will be targeted to 14.2, but it will be done to master branch (3.x).

Acceptance Criteria

@knoobie
Copy link
Contributor

knoobie commented Feb 12, 2020

Please add "Running CI behind a proxy (allow for configuration of a proxy)" as Acceptance Criteria. It's common practice and should not be missed if possible.

Example: all our Jenkins builds run within the companies network and have to access one global artifactory where all binaries / artefacts are stored without any direct access to the internet (Security Reasons / Government Regulation)

caalador added a commit that referenced this issue Feb 20, 2020
Add logging for when we are
automatically installing node
and where it is installed.

Part of #6249
caalador added a commit that referenced this issue Feb 24, 2020
Add logging for when we are
automatically installing node
and where it is installed.

Part of #6249
caalador added a commit that referenced this issue Feb 24, 2020
Add logging for when we are
automatically installing node
and where it is installed.

Part of #6249
caalador added a commit that referenced this issue Feb 24, 2020
Add logging for when we are
automatically installing node
and where it is installed.

Part of #6249
@pleku
Copy link
Contributor

pleku commented Feb 24, 2020

@knoobie the configuration for proxies was done separately as in #7567, it would be great if you could please test it when it lands soon to 14.2.0.alpha5, thanks.

@pleku pleku added this to the 2.2 milestone Apr 29, 2020
@pleku pleku closed this as completed Apr 29, 2020
Vaadin Flow enhancements backlog (Vaadin 10+) automation moved this from Needs Design to Done / Pending Release Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Vaadin Flow enhancements backlog (Vaa...
  
Done / Pending Release
Development

No branches or pull requests

6 participants