Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Files with timestamp of 1970 #16

Closed
fenhaoyuan opened this issue Feb 20, 2018 · 4 comments
Closed

Files with timestamp of 1970 #16

fenhaoyuan opened this issue Feb 20, 2018 · 4 comments

Comments

@fenhaoyuan
Copy link

fenhaoyuan commented Feb 20, 2018

Some files in the new version 0.1.5 are having timestamp of 1970.
This makes some deployment tools like AWS Elasticbeanstalk fails.
Error message:
ZIP does not support timestamps before 1980

Image attached.
screen shot 2018-02-20 at 3 39 13 pm

@fenhaoyuan
Copy link
Author

I had to manually set the version to 0.1.4 to make my deployment works.

@isaacs
Copy link
Contributor

isaacs commented Feb 20, 2018

@fenhaoyuan What version of npm are you using? I think if you upgrade to latest and greatest, it'll probably do the right thing? See this comment: isaacs/node-tar#174 (comment)

@isaacs isaacs closed this as completed Feb 20, 2018
@fenhaoyuan
Copy link
Author

Thanks.
We are using node 7.5.0 and npm 4.1.2
It's not an option to upgrade for now because of limitation in some other node modules we are using. And I think it's quite common that people using not lastest version of node and npm.
Plus, if a new version of this package would break in certain version of node/npm, it should not be set to be compatible to that npm version so our npm won't use it when doing npm install.

Below is a reference of what others think on the same issue in another package:
mishoo/UglifyJS#2054

I guess I will have to stick to the old version by manually setting it, for now.

@isaacs
Copy link
Contributor

isaacs commented Feb 22, 2018

I've talked with the npm cli team, and added a feature to node-tar to support forcibly setting the mtime on tarball creation. I'll update this package once that lands. That should avoid the problem until older versions of npm are no longer in common usage.

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

No branches or pull requests

2 participants