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

January 4, 1970 #6

Closed
dkim-io opened this issue Aug 13, 2020 · 10 comments
Closed

January 4, 1970 #6

dkim-io opened this issue Aug 13, 2020 · 10 comments

Comments

@dkim-io
Copy link

dkim-io commented Aug 13, 2020

When I installed the package, some of the files have a timestamp of January 4, 1970 9:38 AM.

Namely files: LICENSE, README.md, src/index.js

Strangely this causes an error for us when we try to zip our code.

Are you experiencing something similar?

@agos-jwb
Copy link

agos-jwb commented Sep 1, 2020

We are also experiencing the same problem. ZIP file format does not allow dates before 1980. It is causing our AWS deployments to fail.

@nicolo-ribaudo
Copy link
Owner

Do you know what could have caused this problem and if it's something that I can fix?

@dkim-io
Copy link
Author

dkim-io commented Sep 1, 2020

What do you use to push the package to the NPM registry?

@nicolo-ribaudo
Copy link
Owner

I just run lerna publish with yarn 2. I'll check if other packages released with this combination have the same problem.

@agos-jwb
Copy link

agos-jwb commented Sep 2, 2020

We are using python zip. But it really does not matter what we would use to zip files. The Zip file format does not allow dates before 1980.

When you built the NPM package somehow those files got a date of January 4, 1970 9:38 AM.

A quick fix for us is to touch those files. I have modified our scripts to touch those files before we try and zip them. But I have to descend to all node_modules directories and we have dozens.

@sinkcup
Copy link

sinkcup commented Sep 26, 2020

me too. aws/aws-cli#2639

$ find ./node_modules/ -type f -printf '%T+ %p\n' | sort | head -n 10
1970-01-04+23:38:52.0000000000 ./node_modules/babel-preset-current-node-syntax/LICENSE
1970-01-04+23:38:52.0000000000 ./node_modules/babel-preset-current-node-syntax/README.md
1970-01-04+23:38:52.0000000000 ./node_modules/babel-preset-current-node-syntax/src/index.js
1985-10-26+16:15:00.0000000000 ./node_modules/@babel/code-frame/LICENSE
1985-10-26+16:15:00.0000000000 ./node_modules/@babel/code-frame/README.md

HACK:

find ./node_modules/babel-preset-current-node-syntax/ -mtime +10950 -print -exec touch {} \;

@nicolo-ribaudo
Copy link
Owner

Could you check if version 0.1.4-0 (babel-preset-current-node-syntax@next) solves the issue? If it does, I can republish it as a 0.1.4.

@sinkcup
Copy link

sinkcup commented Sep 26, 2020

@nicolo-ribaudo I have try it, always wrong:

$ rm -rf node_modules/babel-preset-current-node-syntax
$ npm install babel-preset-current-node-syntax@next
$ find ./node_modules/babel-preset-current-node-syntax/ -type f -printf '%T+ %p\n' | sort | head -n 10
1970-01-04+23:38:52.0000000000 ./node_modules/babel-preset-current-node-syntax/LICENSE
1970-01-04+23:38:52.0000000000 ./node_modules/babel-preset-current-node-syntax/README.md
1970-01-04+23:38:52.0000000000 ./node_modules/babel-preset-current-node-syntax/src/index.js
2020-09-27+00:17:18.7540922800 ./node_modules/babel-preset-current-node-syntax/package.json

@nicolo-ribaudo
Copy link
Owner

Thanks for the workaround, I have isolated this to a yarn bug: yarnpkg/berry#1882

@nicolo-ribaudo
Copy link
Owner

This should be fixed in v0.1.4

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

4 participants