question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Major issues with NPM, are WebJars still an option?

See original GitHub issue

After two months since the upgrade from V13 to V14, I’m still having major issues related to NPM, especially in CI/CD:

  1. need to maintain two separate dependency trees (Maven + NPM);
  2. for one reason or the other, not all dependencies are detected;
  3. at some point the app breaks and you need to delete node_modules;
  4. the generated package.json refers to the build directory, which is bad per-se and could also be a serious problem when in CI/CD the build directory is different;
  5. also the generated package-lock.json contains references to the build directory, which makes it far more difficult to maintain;
  6. if you have multiple modules with integration tests, you start to have multiple package.json, package-lock.json, webpack.config.js, etc. files per each module, all with these 1–5 issues.

Question is: are WebJars still an option to consider? They’ll make Java developers and DevOps happier, especially for having a single dependency tree to maintain.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
Legiothcommented, Nov 26, 2019

We are currently investigating the possibility adding dependencies based on @NpmModule annotations directly to the top-level package.json file instead of a separate generated file that needs to be referenced from the main file. This is discussed in https://github.com/vaadin/flow/issues/7018.

0reactions
plekucommented, Nov 29, 2019

I’m not sure if there is still something left open with the question - the answer was No 😄

Using pnpm (#6966) and the single package.json are already WIP (#7018) . And those are not the only changes we are looking at, but we have not yet decided the next steps after those.

I’m closing this issue. A newer one can be opened or just comment here if there is still something that was missed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Thank you webjars, for releasing me from NPM hell. - Reddit
All reasonable frontend gets built, transpiled and bundled through npm and friends still so having a dependency through webjars doesn't help ...
Read more >
webjar not loading in spring boot application - Stack Overflow
1 · I am using maven, webjar-locator is in the spring boot starter pack so I am not providing the version. · I...
Read more >
minimist - npm
Any arguments after '--' will not be parsed and will end up in argv._ . options can be: opts.string - a string or...
Read more >
simple-git - npm
To resolve these issues, either upgrade to a newer version of node.js or ensure you are using the necessary polyfills from core-js -...
Read more >
browserslist - npm
Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-env-preset. Latest version: 4.21.4, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found