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

npm5 beta 56: npm pack changes timestamps to 01/01/1970 on Windows 7 #16734

@gibfahn

Description

@gibfahn

I'm opening this issue because:

  • npm is doing something I don't understand.

What's going wrong?

npm pack on Windows seems to be resetting timestamps to 01/01/1970, which breaks several unzipping tools one zipping tool.

How can the CLI team reproduce the problem?

Download the latest Node 8 rc, v8.0.0-rc1 for win-x64 and unzip.

cd node-v8.0.0-rc.1-win-x64
set path=%cd%;%path%
cd ..
mkdir tst
cd tst
npm init -y
echo console.log('hello world') >index.js
npm pack
:: Install Git Bash to get tar.exe
set path=C:\Program Files\Git\usr\bin;%path%
tar -xf tst-1.0.0.tgz
cd package
dir

Output:

05/26/2017  03:49 PM    <DIR>          .
05/26/2017  03:49 PM    <DIR>          ..
01/01/1970  01:00 AM                29 index.js
01/01/1970  01:00 AM               217 package.json
               2 File(s)            246 bytes
               2 Dir(s)  129,871,679,488 bytes free

supporting information:

  • npm -v: 5.0.0-beta.56
  • node -v : v8.0.0-rc.1
  • npm config get registry: https://registry.npmjs.org/
  • Windows: Windows 7

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions