I had this in Windows Linux Subsystem too, after moving a project from Windows to Linux. I failed to fix it with
rm -rf node_modules
rm package-lock.json
npm cache clear --force
chown -R username:username *
npm install
None of this worked.
futime
errors are caused by the tar
utility not having enough rights to perform the necessary actions to expand the .tar files used by npm and the node modules.
In the case of Alpine Linux, you may need to unpack as root and then chown
the files, or create a folder owned as the user with the right permissions.
For Windows Subsystem for Linux, it doesn't seem to work with folders under /mnt/c
and refuses to change permissions. Setting them in Linux has no effect, and setting them in Windows doesn't seem to make any difference either - adding full control to the 'Everyone' principle doesn't solve this.
(probable) solution for Alpine:
sudo mkdir project_folder
sudo chown username project_folder
cd project_folder
...
Solution for WSL:
Move the folder into the WSL folder, eg. mv project ~\
so that permissions work correctly.