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

Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped when adding angular developed library? #8184

Open
RoshanGajula opened this issue Jun 11, 2020 · 0 comments

Comments

@RoshanGajula
Copy link

RoshanGajula commented Jun 11, 2020

Environment as below:
Dependencies:
"@angular/compiler": "~8.2.14",
"@angular/core": "~8.2.14",

devDependencies:
"@angular-devkit/build-angular": "~0.803.25",
"@angular-devkit/build-ng-packagr": "~0.803.25",
"@angular/cli": "~8.3.25",
"@angular/compiler-cli": "~8.2.14",

Steps followed to develop the library
run "ng g library @scope/lib-name.
run "yarn build @scope/lib-name" in root-level

then
from dist/scope/lib-name, i have run the command "yarn pack" and .tgz file generated.

To integrate this .tgz file in other application followed below steps:
Navigated to the other application foot folder and run command - "yarn add ./../lib-name.tgz" to add it to the current application.

Then run "yarn install" to add library dependencies.
Added the library exposed module to app module and added the library exposed component selector in app.component.html.

Then When i run "yarn develop", everything was working well. I was able to see output along with library in the current application view.

Then when i deploy the application using Jenkins, getting below error. Unable to figure out the cause. any help would be much appreciated.

Error:
error Extracting tar content of "/build/src/libName-v0.0.1.tgz" failed, the file appears to be corrupt: "Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?"

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

1 participant