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

Could not extract the Node archive on OSX #813

Open
otrebski opened this issue May 14, 2019 · 9 comments
Open

Could not extract the Node archive on OSX #813

otrebski opened this issue May 14, 2019 · 9 comments

Comments

@otrebski
Copy link

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Fails to download node on OSX with following error:

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.7.6:install-node-and-npm (install node and npm) on project *********: Could not extract the Node archive: Could not extract archive: '/Users/*****/.m2/repository/com/github/eirslett/node/10.15.3/node-10.15.3-darwin-x64.tar.gz': Expanding node-v10.15.3-darwin-x64/ would create file outside of /tmp/node/tmp -> [Help 1]

If the current behavior is a bug, please provide the steps to reproduce.
On OSX run mvn install

What is the expected behavior?
npm will be installed and run build

Please mention your frontend-maven-plugin and operating system version.
Plugin version: frontend-maven-plugin:1.7.6
OS: OSX 18.5.0 Darwin Kernel Version 18.5.0

@margingrotle
Copy link

I am experiencing the same.

@MikeThomsen
Copy link
Contributor

@eirslett I just sent you a PR that fixes this on my MBP. The issue that I found was that it's triggered on macOS by a case-insensitive path. For some reason, a folder in my repo that is named Frontend was getting processed as frontend by this plugin (or vice versa, regardless it was case sensitivity).

I added new checks for case sensitive file systems to ArchiveExtractor and was able to build the project just fine using that fork of the plugin. PR is here

@aozolin
Copy link

aozolin commented Sep 3, 2019

I have exactly the same issue on Windows 10 OS.
It works fine with

frontend-maven-plugin:1.6
But doesn't work with 1.7.x and 1.8.0
Could you fix it please?

Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.7.5:install-node-and-npm (+++ install node and npm into core +++) on project test-project: Could not extract the npm archive: Could not extract archive: 'C:\Users\Administrator\.m2\repository\com\github\eirslett\npm\6.9.0\npm-6.9.0.tar.gz': Expanding package/package.json would create file outside of c:\Jenkins\workspace\Test Project\test-project\src\main\frontend\src\test\node\node_modules

@MikeThomsen
Copy link
Contributor

@aozolin it appears to be a case sensitivity issue with your file system. Try messing around with the name of the folder and the name of the module (inside of the pom.xml) to make sure that they're exactly the same (ie both Frontend or frontend since the default for HPFS+, APFS and NTFS appears to be case insensitive)

@kasingal
Copy link

I am facing similar problem:

[INFO] --- frontend-maven-plugin:1.7.1:install-node-and-yarn (install node and yarn) @ odlux-framework ---
[INFO] Installing node version v8.10.0
[DEBUG] Creating install directory /home/jenkins/jobs/my-jenkins-job/workspace/odlux/framework/node
[DEBUG] Creating temporary directory /home/jenkins/jobs/my-jenkins-job/workspace/odlux/framework/node/tmp
[INFO] Unpacking /home/jenkins/.m2/repository/com/github/eirslett/node/8.10.0/node-8.10.0-linux-x64.tar.gz into /home/jenkins/jobs/my-jenkins-job/workspace/odlux/framework/node/tmp

[ERROR] Failed to execute goal de.jacksitlab:frontend-maven-plugin:1.7.1:install-node-and-yarn (install node and yarn) on project odlux-framework: Could not extract the Node archive: Could not extract archive: '/home/jenkins/.m2/repository/com/github/eirslett/node/8.10.0/node-8.10.0-linux-x64.tar.gz': Expanding node-v8.10.0-linux-x64/ would create file outside of /home/jenkins/jobs/my-jenkins-job/workspace/odlux/framework/node/tmp -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal de.jacksitlab:frontend-maven-plugin:1.7.1:install-node-and-yarn (install node and yarn) on project odlux-framework: Could not extract the Node archive: Could not extract archive: '/home/jenkins/.m2/repository/com/github/eirslett/node/8.10.0/node-8.10.0-linux-x64.tar.gz'

Caused by: org.apache.maven.plugin.MojoFailureException: Could not extract the Node archive: Could not extract archive: '/home/jenkins/.m2/repository/com/github/eirslett/node/8.10.0/node-8.10.0-linux-x64.tar.gz'

Caused by: com.github.eirslett.maven.plugins.frontend.lib.InstallationException: Could not extract the Node archive

Caused by: com.github.eirslett.maven.plugins.frontend.lib.ArchiveExtractionException: Could not extract archive: '/home/jenkins/.m2/repository/com/github/eirslett/node/8.10.0/node-8.10.0-linux-x64.tar.gz'

Caused by: java.io.IOException: Expanding node-v8.10.0-linux-x64/ would create file outside of /home/jenkins/jobs/my-jenkins-job/workspace/odlux/framework/node/tmp

@mangkang
Copy link

Hi,

We are encountering similar issue on OSX. Any plans to merge this PR? Thanks.

@aozolin
Copy link

aozolin commented Dec 3, 2019

Hi,

The issue is still not fixed. Still see the same issue with 1.8.0 version.
@eirslett do you have an idea when they are going to release the fix?

@davidnewcomb
Copy link

davidnewcomb commented May 23, 2020

I've just installed node v14.3.0 and it looks fixed now. I did it via install-node-and-yarn.

Darwin 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64

@NilukaSripalim
Copy link

NilukaSripalim commented Aug 20, 2020

@davidnewcomb for me also issue was fixed with your suggestion.

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

8 participants