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

Incorrect permissions in ts-node-9.1.0.tgz package cause problems on Windows #1172

Closed
ljani opened this issue Dec 7, 2020 · 6 comments
Closed

Comments

@ljani
Copy link
Contributor

ljani commented Dec 7, 2020

Expected Behavior

> npm install --save ts-node@9.1.0

added 10 packages, and audited 10 packages in 2s

found 0 vulnerabilities

Actual Behavior

> npm install --save ts-node@9.1.0
npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, unlink 'C:\devel\tsnodeissue\node_modules\ts-node\dist\bin-script-deprecated.js.DELETE.6bad7b3aefa457ee475cbe3e0ab11a71'
npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, unlink 'C:\devel\tsnodeissue\node_modules\ts-node\dist\bin-transpile.js.DELETE.ce41aa8b732a61e09096af485533cf39'

added 10 packages, and audited 10 packages in 2s

found 0 vulnerabilities

Sometimes index.js has similar problems, I'm not sure why it won't fail always:

npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, unlink 'C:\devel\tsnodeissue\node_modules\ts-node\dist\bin-script-deprecated.js.DELETE.8068fdc3a9a01bade897c512061e070b'
npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, unlink 'C:\devel\tsnodeissue\node_modules\ts-node\dist\bin-script.js.DELETE.aa1a8902e3b47234d47d9b7132d3b5ef'
npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, unlink 'C:\devel\tsnodeissue\node_modules\ts-node\dist\bin-transpile.js.DELETE.f6940ca2fd83d98a8f3b8aa33bb5a090'
npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, unlink 'C:\devel\tsnodeissue\node_modules\ts-node\dist\index.js.DELETE.6e814ea0ba184ddb4b958fe96cfd77d6'

Steps to reproduce the problem

  • Get a Windows 10 box
  • Install Node.JS v15.3.0 with npm@7

Minimal reproduction

npm init --yes
npm install --save ts-node@9.1.0

Specifications

> node -v
v15.3.0
> npm -v
7.1.0
> ver
Microsoft Windows [Version 10.0.19042.630]

Other

ts-node@9.0.0 works fine.

@ljani
Copy link
Contributor Author

ljani commented Dec 7, 2020

Hmm, the archive contents seem a bit wonky:

> tar --list --verbose --file ts-node-9.1.0.tgz | grep bin-transpile.js
-rw-r--r-- 0/0             223 1985-10-26 10:15 package/dist//bin-transpile.js
-rwxr-xr-x 0/0             223 1985-10-26 10:15 package/dist/bin-transpile.js
-rw-r--r-- 0/0             319 1985-10-26 10:15 package/dist//bin-transpile.js.map
> tar --list --verbose --file ts-node-9.0.0.tgz | grep bin-transpile.js
-rw-r--r-- 0/0             230 1985-10-26 10:15 package/dist/bin-transpile.js
-rw-r--r-- 0/0             356 1985-10-26 10:15 package/dist/bin-transpile.js.map

@cspotcode
Copy link
Collaborator

I see what you mean; those double-slashes are all over the tarball.

@cspotcode
Copy link
Collaborator

Nothing different in the package.jsons, so I suspect it's an npm issue, either I published with a very old or very new version of npm.

https://github.com/TypeStrong/ts-node/compare/v9.0.0..v9.1.0

@cspotcode
Copy link
Collaborator

cspotcode commented Dec 7, 2020

Looks like this is the culprit: npm/cli@b737ee9
npm/cli#2007
npm/cli#2009

@cspotcode
Copy link
Collaborator

@ljani I've published v9.1.1 using npm v6. It looks like the tarball paths are now correct, matching v9.0.0. Let me know if this fixes the problem for you.

@ljani
Copy link
Contributor Author

ljani commented Dec 8, 2020

ts-node@v9.1.1 works fine! Thanks!

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

2 participants