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.

use system npm/node

See original GitHub issue

I want to use the system’s node/npm instead of installing one because installing is slow. But when I omit the install step, I get:

java.io.IOException: Cannot run program ".../target/node/node" (in directory "...//target"): error=2, No such file or directory -> [Help 1]

though I know that npm/node is on the path. Is there a way to use the system’s node/npm instead of installing one?

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
naderghanbaricommented, Jul 17, 2016

Even if being faster is not one’s concern, having the option to use the system installed node is really expected from this plugin. Most of similar plugins have such an option even as the default behavior, if you want to cache between builds, you can simply override the deault by saying something like <downloadNode>true</downloadNode>

1reaction
worldsayshicommented, Jun 20, 2016

For anyone else arriving here looking for clues on how to speed up the build process using frontend-maven-plugin one thing that helped me slash a lot of build time was to avoid copying node_modules into target. I use the warSourceExcludes directive in maven-war-plugin for this. Confusingly enough there are many different exclude directives in war plugin but this one is the one that controls what is to be copied into target folder in the first place. The others control what is to be included into the war package.

Example:

  <plugin>
      <artifactId>maven-war-plugin</artifactId>
      <configuration>
          <dependentWarExcludes>WEB-INF/lib/*.jar</dependentWarExcludes>
          <warSourceExcludes>**/node_modules/**</warSourceExcludes>
          <archiveClasses>true</archiveClasses>
          <attachClasses>true</attachClasses>
      </configuration>
  </plugin>
Read more comments on GitHub >

github_iconTop Results From Across the Web

system - npm
Flexible module and resource system. Latest version: 2.0.1, last published: 5 years ago. Start using system in your project by running `npm ......
Read more >
How to Install Node.js and npm on Windows, macOS, and Linux
Every operating system has a distinct method of installing Node.js. The core setup file differs for each OS to OS. However, the Node.js...
Read more >
How to Install Node.js and NPM on Windows and Mac?
Step 1: Download the .pkg Installer · Step 2: Run Node.js Installer · Step 3: Verify Node.js Installation · Step 4: Update Your...
Read more >
How To Use Node.js Modules with npm and package.json
The Node.js Package Manager (npm) is the default and most popular package manager in the Node.js ecosystem, and is primarily used to install...
Read more >
How to Install Node.js and NPM on Windows - phoenixNAP
1. Once the installer finishes downloading, launch it. · 2. The system will ask if you want to run the software – click...
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