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

Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:yar n (yarn install) on project zeppelin-web #562

Closed
vishalkin opened this issue Feb 2, 2017 · 50 comments

Comments

@vishalkin
Copy link

[ERROR] error Command failed with exit code 1.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Zeppelin ........................................... SUCCESS [ 50.394 s]
[INFO] Zeppelin: Interpreter .............................. SUCCESS [ 31.632 s]
[INFO] Zeppelin: Zengine .................................. SUCCESS [ 24.134 s]
[INFO] Zeppelin: Display system apis ...................... SUCCESS [ 19.607 s]
[INFO] Zeppelin: Spark dependencies ....................... SUCCESS [01:33 min]
[INFO] Zeppelin: Spark .................................... SUCCESS [ 29.058 s]
[INFO] Zeppelin: Markdown interpreter ..................... SUCCESS [  5.796 s]
[INFO] Zeppelin: Angular interpreter ...................... SUCCESS [  4.361 s]
[INFO] Zeppelin: Shell interpreter ........................ SUCCESS [  4.827 s]
[INFO] Zeppelin: Livy interpreter ......................... SUCCESS [ 50.227 s]
[INFO] Zeppelin: HBase interpreter ........................ SUCCESS [ 11.682 s]
[INFO] Zeppelin: Apache Pig Interpreter ................... SUCCESS [ 10.991 s]
[INFO] Zeppelin: PostgreSQL interpreter ................... SUCCESS [  5.541 s]
[INFO] Zeppelin: JDBC interpreter ......................... SUCCESS [  6.663 s]
[INFO] Zeppelin: File System Interpreters ................. SUCCESS [  6.304 s]
[INFO] Zeppelin: Flink .................................... SUCCESS [ 13.449 s]
[INFO] Zeppelin: Apache Ignite interpreter ................ SUCCESS [  5.955 s]
[INFO] Zeppelin: Kylin interpreter ........................ SUCCESS [  4.915 s]
[INFO] Zeppelin: Python interpreter ....................... SUCCESS [  6.109 s]
[INFO] Zeppelin: Lens interpreter ......................... SUCCESS [ 11.360 s]
[INFO] Zeppelin: Apache Cassandra interpreter ............. SUCCESS [ 58.287 s]
[INFO] Zeppelin: Elasticsearch interpreter ................ SUCCESS [  9.617 s]
[INFO] Zeppelin: BigQuery interpreter ..................... SUCCESS [  5.584 s]
[INFO] Zeppelin: Alluxio interpreter ...................... SUCCESS [  9.001 s]
[INFO] Zeppelin: Scio ..................................... SUCCESS [ 48.425 s]
[INFO] Zeppelin: web Application .......................... FAILURE [28:26 min]
[INFO] Zeppelin: Server ................................... SKIPPED
[INFO] Zeppelin: Packaging distribution ................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 37:14 min
[INFO] Finished at: 2017-02-01T16:21:39+05:30
[INFO] Final Memory: 224M/1792M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:yar
n (yarn install) on project zeppelin-web: Failed to run task: 'yarn install --no
-lockfile --https-proxy=http://sg0227823:***@tulsa-proxy.sabre.com:80 --proxy=ht
tp://sg0227823:***@tulsa-proxy.sabre.com:80' failed. (error code 1) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
eption
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command

[ERROR]   mvn <goals> -rf :zeppelin-web
@jagatsingh
Copy link

Can you try to run with -X and see if its proxy related issue.

Example you might need .bowerc file with proxy

See http://stackoverflow.com/questions/21705091/bower-behind-a-proxy

@1ambda
Copy link

1ambda commented Feb 9, 2017

@jagatsingh Hi

Does frontend-maven-plugin support script tag in package.json?

@pouu69
Copy link

pouu69 commented Feb 9, 2017

i have same issue ㅜㅜ
plz help me

@ningod
Copy link

ningod commented Feb 9, 2017

I use yarn script from package.json in my project and my pom.xml look ( no run argument ) like this:

<execution>
  <id>frontend-yarn-script</id>
  <goals>
    <goal>yarn</goal>
  </goals>
  <configuration>
    <arguments>myscript -- --myscriptargname myscriptargvalue</arguments>
  </configuration>
  <phase>process-resources</phase>
</execution>

@1ambda
Copy link

1ambda commented Feb 12, 2017

Hi all. Any update?

@1ambda
Copy link

1ambda commented Feb 13, 2017

I figured out that only yarn causes this problem. NPM installed by frontend-maven-plugins works well.

@DmytroShkvyra
Copy link

DmytroShkvyra commented Feb 16, 2017

@pouu69 You can try something like this

          <execution>
              <id>yarn add bower</id>
              <goals>
                  <goal>yarn</goal>
              </goals>
              <phase>generate-sources</phase>
              <configuration>
                  <arguments>add bower karma-phantomjs-launcher --no-lockfile --no-bin-links</arguments>
              </configuration>
          </execution>
          <execution>
              <id>bower install</id>
              <goals>
                  <goal>bower</goal>
              </goals>
              <phase>generate-sources</phase>
              <configuration>
                  <arguments>install --silent --allow-root</arguments>
              </configuration>
          </execution> 

``
--no-bin-links can help you

asfgit pushed a commit to apache/zeppelin that referenced this issue Feb 21, 2017
…failure (BUG)

### What is this PR for?

yarn installed by frontend-maven-plugin causes build failure **when there is no nodeJS in local system**

To reproduce this bug

- Remove system nodejs
- Execute `mvn -X clean package -pl 'zeppelin-web' -DskipTests;`

#### Details.

- yarn installed by frontend-maven-plugin can't run commands described in scripts tag (`package.json`)
- it's due to yarn uses npm when run script tags.
- so we need to npm as well

#### See also

#2002
eirslett/frontend-maven-plugin#562

### What type of PR is it?
[Bug Fix]

### Todos
* [x] - Rollback yarn to npm
* [x] - Update README.md for zeppelin-web

### What is the Jira issue?

[ZEPPELIN-2105](https://issues.apache.org/jira/browse/ZEPPELIN-2105)

### How should this be tested?

- Remove system nodejs
- `mvn -X clean package -pl 'zeppelin-web' -DskipTests;`

### Screenshots (if appropriate)

NONE

### Questions:
* Does the licenses files need update? - NO
* Is there breaking changes for older versions? - NO
* Does this needs documentation? - NO

Author: 1ambda <[email protected]>

Closes #2016 from 1ambda/ZEPPELIN-2105/rollback-yarn-to-npm and squashes the following commits:

c2affeb [1ambda] fix: Install npm as well
asfgit pushed a commit to apache/zeppelin that referenced this issue Feb 21, 2017
…failure (BUG)

### What is this PR for?

yarn installed by frontend-maven-plugin causes build failure **when there is no nodeJS in local system**

To reproduce this bug

- Remove system nodejs
- Execute `mvn -X clean package -pl 'zeppelin-web' -DskipTests;`

#### Details.

- yarn installed by frontend-maven-plugin can't run commands described in scripts tag (`package.json`)
- it's due to yarn uses npm when run script tags.
- so we need to npm as well

#### See also

#2002
eirslett/frontend-maven-plugin#562

### What type of PR is it?
[Bug Fix]

### Todos
* [x] - Rollback yarn to npm
* [x] - Update README.md for zeppelin-web

### What is the Jira issue?

[ZEPPELIN-2105](https://issues.apache.org/jira/browse/ZEPPELIN-2105)

### How should this be tested?

- Remove system nodejs
- `mvn -X clean package -pl 'zeppelin-web' -DskipTests;`

### Screenshots (if appropriate)

NONE

### Questions:
* Does the licenses files need update? - NO
* Is there breaking changes for older versions? - NO
* Does this needs documentation? - NO

Author: 1ambda <[email protected]>

Closes #2016 from 1ambda/ZEPPELIN-2105/rollback-yarn-to-npm and squashes the following commits:

c2affeb [1ambda] fix: Install npm as well

(cherry picked from commit 4fd85f7)
Signed-off-by: Lee moon soo <[email protected]>
@hellozeck
Copy link

Hi, how to solve this problem ?

@andreaTP
Copy link

as a workaround you can go into zeppelin-web folder and remove all the present folders but src, this worked for me at least, probably the clean task should be improved.

@1ambda
Copy link

1ambda commented May 24, 2017

The problem is that yarn uses npm. So if we install yarn without npm, then it fails.
In Zeppelin project, we are installing both.

https://github.com/apache/zeppelin/blob/master/zeppelin-web/pom.xml#L70-L71

@andreaTP
Copy link

I'm from time to time facing again this problem into zeppelin project on master branch.
That's why I always fall into this issue :-)

@1ambda
Copy link

1ambda commented May 24, 2017

@andreaTP Which OS do you use? I haven't failed after that fix.

@zjffdu
Copy link

zjffdu commented May 24, 2017

Today I hit the same issue on centos 7

@spencersmith
Copy link

Same problem here. centos7. Using master branch.

@spencersmith
Copy link

@1ambda Which fix are you referring to?

@zjffdu
Copy link

zjffdu commented May 25, 2017

Got it, I should use not-root user

@yang0228
Copy link

Please help i run into a similar failure when compiling zeppelin-0.7.1:

[INFO] Zeppelin: Scio ..................................... SUCCESS [ 43.334 s]
[INFO] Zeppelin: web Application .......................... FAILURE [ 5.521 s]
[INFO] Zeppelin: Server ................................... SKIPPED
[INFO] Zeppelin: Packaging distribution ................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:11 min
[INFO] Finished at: 2017-05-25T01:02:36+08:00
[INFO] Final Memory: 465M/3183M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:install-node-and-yarn (install node and yarn) on project zeppelin-web: Could not download Yarn: Could not download https://github.com/yarnpkg/yarn/releases/download/v0.18.1/yarn-v0.18.1.tar.gz: Connect to github-cloud.s3.amazonaws.com:443 [github-cloud.s3.amazonaws.com/54.231.34.41] failed: Connection timed out -> [Help 1]

@1ambda
Copy link

1ambda commented May 25, 2017

@spencersmith

I am using OSX.

@yang0228 The connection failure is due to network problem. If you zeppelin instance is behind of proxy, there is a PR for it. Please test: apache/zeppelin#2363

Otherwise, you need to check your network connection.

@tsyrjanen
Copy link

I have also this issue (master branch).
Before
[INFO] Reactor Summary:
I see

[INFO] Installing npm version 4.2.0
[INFO] Downloading https://nodejs.org/dist/npm-4.2.0.tgz to /root/.m2/repository/com/github/eirslett/npm/4.2.0/npm-4.2.0.tar.gz

If you check with browser and go to https://nodejs.org/dist and try to find npm-4.2.0.tgz, it is not there.

@tsyrjanen
Copy link

Sorry, I am using also this apache/zeppelin#2483, so what I commented before might be problem in pull request.

@andreaTP
Copy link

it turned out that there is a bug into the plugin itself using the deprecated parameter downloadRoot is bugged, removed it from PR, now it should work.

@msegel
Copy link

msegel commented Sep 22, 2017

Guys, its Sept 22, still have the same issue.
What is the best work around?
Or better yet... what's the permanent fix?

@oalam
Copy link

oalam commented Sep 27, 2017

hi all. I'm also facing this issue. is there any workaround yet ?

@douglaspenna
Copy link

Just discovered that it gets a timeout, when it tries to access angular-viewport-watch

error An unexpected error occurred: "https://raw.githubusercontent.com/shahata/angular-viewport-watch/182923b3934e63817b6fc7b640ecb5c4a011f74c/package.json: ETIMEDOUT"

I'll post more once I've found a fix

@shral
Copy link

shral commented Oct 18, 2017

Hi,
I just got this error too, after I deleted the "node_module" and the "node" folder in my project, I could compile without problem.
Best Regards
Shefki

@Salman9545
Copy link

Salman9545 commented Oct 27, 2017

Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.2:install-node-and-npm (install node and npm) on project dot: The plugin com.github.eirslett:frontend-maven-plugin:1.2 requires Maven version 3.1.0 -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
my mvn - version is 3.1.0
java version is 1.8.0_144

But this error occour plz help me

@andreaTP
Copy link

ok, I will just report my experience, basically what is happening is that there is a connection drop by user or by server while downloading dependencies, and this causes an unrecoverable error.
From time to time Python packages server and/or NPM server could be not 100% reliable and that's causing the issue (for a few hours/days) for someone.

We overcome this limitation by configuring properly a locally cached proxy repository (Artifactory) for all of this packages.
A proper retry policy on a package level (especially on wget commands) could eventually ends up with a proper solution.

@eirslett
Copy link
Owner

Maybe we could fetch checksums for node.js/yarn/npm and verify the downloaded package before we extract it...

@Salman9545
Copy link

than how i can resolve my this error to start work in netbeans for development

@Salman9545
Copy link

Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.2:install-node-and-npm (install node and npm) on project dot: The plugin com.github.eirslett:frontend-maven-plugin:1.2 requires Maven version 3.1.0 -> [Help 1]
but my maven version is 3.1.0 but this error occour always and my jdk is 8

@mashhur
Copy link

mashhur commented Nov 17, 2017

i got also same issue, it is because of certificate and tried to give download pages (not HTTPS) manually. However, this might not solve your problem if your script is calling another HTTPS download pages.
hope it helps~

<configuration> <nodeVersion>v5.6.0</nodeVersion> <npmVersion>3.6.0</npmVersion <nodeDownloadRoot>http://nodejs.org/dist/</nodeDownloadRoot <npmDownloadRoot>http://registry.npmjs.org/npm/-/</npmDownloadRoot> </configuration>

@Tagar
Copy link

Tagar commented Jan 3, 2018

https://stackoverflow.com/a/48070980/470583

hope this helps.

@MahatmaFatalError
Copy link

On my Windows machine the git command was not in $PATH variable which led to the exact same error during build of web Application since npm or bower needs to check out some code. I found out by running mvn command with -e -X for debug.

@pietermartin
Copy link

Got the same failure on Centos 7. Needed to install bzip2. un-tar of phantomjs in the /tmp dir was failing.

@mkhalid12
Copy link

Got the same failure with Ubuntu. Can anyone please help?

@Tagar
Copy link

Tagar commented Mar 20, 2018

@mkhalid12 have you checked my answer on https://stackoverflow.com/a/48070980/470583
hope this helps you

@mkhalid12
Copy link

Hi @Tagar thanks for your reply. But I solved this problem no I have following exception

[ERROR] npm ERR! code ELIFECYCLE [ERROR] npm ERR! errno 3 [ERROR] npm ERR! [email protected] build:dist: npm-run-all prebuild && grunt pre-webpack-dist && webpack && grunt post-webpack-dist [ERROR] npm ERR! Exit status 3 [ERROR] npm ERR! [ERROR] npm ERR! Failed at the [email protected] build:dist script.

Can you please help on it ?
Also if you know When new version 0.8 will release ?

@chamikaras
Copy link

Already I have faced this Issue in Ubuntu. I moved my files to home directory and it will fixed the issue. This issue about permissions check that out

@mcahornsirup
Copy link

mcahornsirup commented Aug 30, 2018

I have fixed it by removing ~/m2/repository/com/github/eirslett and build again with version 1.6.

@RizwanQad
Copy link

I am also facing the same issue:

INFO] --- frontend-maven-plugin:1.6:install-node-and-yarn (install node and yarn) @ common ---
[INFO] Node v8.9.0 is already installed.
[INFO] Installing Yarn version v1.3.2
[INFO] Downloading https://github.com/yarnpkg/yarn/releases/download/v1.3.2/yarn-v1.3.2.tar.gz to C:\Users\sqadri.m2\repository\com\github\eirslett\yarn\1.3.2\yarn-1.3.2.tar.gz
[INFO] No proxies configured
[INFO] No proxy was configured, downloading directly
Dec 26, 2018 12:35:42 PM org.apache.http.client.protocol.ResponseProcessCookies processCookies
WARNING: Invalid cookie header: "Set-Cookie: has_recent_activity=1; path=/; expires=Wed, 26 Dec 2018 10:35:42 -0000". Invalid 'expires' attribute: Wed, 26 Dec 2018 10:35:42 -0000
Dec 26, 2018 12:35:42 PM org.apache.http.client.protocol.ResponseProcessCookies processCookies
WARNING: Invalid cookie header: "Set-Cookie: logged_in=no; domain=.github.com; path=/; expires=Sun, 26 Dec 2038 09:35:42 -0000; secure; HttpOnly". Invalid 'expires' attribute: Sun, 26 Dec 2038 09:35:42 -0000
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25.929 s
[INFO] Finished at: 2018-12-26T12:35:43+03:00
[INFO] Final Memory: 29M/255M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:install-node-and-yarn (install node and yarn) on project common: Could not download Yarn: Could not download https://github.com/yarnpkg/yarn/releases/download/v1.3.2/yarn-v1.3.2.tar.gz: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]

@salamswapnil
Copy link

@mcahornsirup It worked for me with your fix.
Thanks.

@shazhinde
Copy link

shazhinde commented Mar 28, 2019

Another successful fix with @mcahornsirup suggestion, thanks!
#562 (comment)

@vthinkxie
Copy link

try clear ~/.npm/

@ddmx
Copy link

ddmx commented Jun 17, 2019

@vthinkxie I cleared, it worked, thanks!

@AaronBotech
Copy link

AaronBotech commented Sep 18, 2019

I have also this issue

[INFO] Installing npm version 10.16.3
[INFO] Installing jhipster

I have this error, I need help

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.8.0:npm (webpack build dev) on project app-kibana: Failed to run task: 'npm run webpack:build' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 2 (Exit value: 2) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

@anjanas29
Copy link

Getting this issue while compiling opennms 25.0.0

@zhisheng17
Copy link

@mcahornsirup
It worked for me with your fix.Thanks.

@prncoprs
Copy link

prncoprs commented Oct 8, 2020

Same issue on MacOS 10.15.7.
Removing the com.github.eirslett:frontend-maven-plugin:1.6 does not work.
Removing the ~/.npm does not work.

@samanthaherath
Copy link

Dear All'
Already I have faced this Issue in Ubuntu18.04 i am installing opencast when i installing open cast i have faced to this problem please help

[INFO] Assemblies // Apache Karaf Features ................ SKIPPED
[INFO] Assemblies // Distribution Admin ................... SKIPPED
[INFO] Assemblies // Distribution Admin/Presentation ...... SKIPPED
[INFO] Assemblies // Distribution All-In-One .............. SKIPPED
[INFO] Assemblies // Distribution Ingest .................. SKIPPED
[INFO] Assemblies // Distribution Presentation ............ SKIPPED
[INFO] Assemblies // Distribution Worker .................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 06:50 min
[INFO] Finished at: 2020-10-14T09:42:13+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.7.6:install-node-and-npm (install node and npm) on project opencast-admin-ui: Could not download Node.js: Got error code 404 from the server. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :opencast-admin-ui

@emmaearl
Copy link

I have fixed it by removing ~/m2/repository/com/github/eirslett and build again with version 1.6.

Hm - i don't seem to have this file locally?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests