cdk-ecr-deployment icon indicating copy to clipboard operation
cdk-ecr-deployment copied to clipboard

Package installation fails on Windows Powershell

Open kb3eua opened this issue 3 years ago • 10 comments

Doing an npm install on a Windows Powershell prompt with the latest version of this package (0.0.80) yields the following error: image

I can only install successfully if I go back to version 0.0.76.

kb3eua avatar Nov 15 '21 14:11 kb3eua

I'm experiencing the same issue on windows 10 command prompt. I tried it with the same node and npm version on Ubuntu 20.04 and it worked fine.

node version: 14.17.0 npm version: 6.14.13 cdk-ecr-deployment versions tried:

  • 2.1.2
  • 1.0.2
  • 1.0.0
  • 0.0.89

Steps to reproduce:

  • open command prompt on windows as an administrator
  • create new folder and run npm init
  • then run npm install cdk-ecr-deployment

Expected result:

  • it runs without error

Actual result:

  • it fails on Error: EPERM: operation not permitted, rename ... (same locations as in picture above)

Is there any update on this?

marketasolanikova avatar Jan 26 '22 10:01 marketasolanikova

Can confirm is an issue for me, adding the error as text below.

Node: 14.17.6 NPM: 6.14.15 OS: Win 10

npm ERR! code EPERM
npm ERR! syscall rename
npm ERR! path C:\workspace\core\node_modules\cdk-ecr-deployment\node_modules\@types\.keyv.DELETE\node_modules\@types
npm ERR! dest C:\workspace\core\node_modules\cdk-ecr-deployment\node_modules\@types\keyv\node_modules\@types
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, rename 'C:\workspace\core\node_modules\cdk-ecr-deployment\node_modules\@types\.keyv.DELETE\node_modules\@types' -> 'C:\workspace\core\node_modules\cdk-ecr-deployment\node_modules\@types\keyv\node_modules\@types'
npm ERR!  [OperationalError: EPERM: operation not permitted, rename 'C:\workspace\core\node_modules\cdk-ecr-deployment\node_modules\@types\.keyv.DELETE\node_modules\@types' -> 'C:\workspace\core\node_modules\cdk-ecr-deployment\node_modules\@types\keyv\node_modules\@types'] {
npm ERR!   cause: [Error: EPERM: operation not permitted, rename 'C:\workspace\core\node_modules\cdk-ecr-deployment\node_modules\@types\.keyv.DELETE\node_modules\@types' -> 'C:\workspace\core\node_modules\cdk-ecr-deployment\node_modules\@types\keyv\node_modules\@types'] {
npm ERR!     errno: -4048,
npm ERR!     code: 'EPERM',
npm ERR!     syscall: 'rename',
npm ERR!     path: 'C:\\workspace\\core\\node_modules\\cdk-ecr-deployment\\node_modules\\@types\\.keyv.DELETE\\node_modules\\@types',
npm ERR!     dest: 'C:\\workspace\\core\\node_modules\\cdk-ecr-deployment\\node_modules\\@types\\keyv\\node_modules\\@types'
npm ERR!   },
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'rename',
npm ERR!   path: 'C:\\workspace\\core\\node_modules\\cdk-ecr-deployment\\node_modules\\@types\\.keyv.DELETE\\node_modules\\@types',
npm ERR!   dest: 'C:\\workspace\\core\\node_modules\\cdk-ecr-deployment\\node_modules\\@types\\keyv\\node_modules\\@types',
npm ERR!   parent: 'cdk-ecr-deployment'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

daverickdunn avatar Feb 08 '22 10:02 daverickdunn

Works with Node 16.13.2 and NPM 8.4.1.

I suspect this is an NPM issue, seeing that 7 introduced significant changes, but that's purely a guess.

This is still a pain for me however, as I've a lot of other projects that need to stay on 14, so a fix to support NPM 6 would still be appreciated, if possible.

daverickdunn avatar Feb 08 '22 11:02 daverickdunn

Can confirm what daverickdunn said, I updated my Node and NPM, now being on Node: 17.6.0 NPM: 8.5.1

It installed without any problem

Chris59160 avatar Mar 03 '22 23:03 Chris59160

I think this comes through Projen, but as said it's not happening with NPM version higher than 6.

See https://github.com/projen/projen/issues/498

Hi-Fi avatar Mar 04 '22 05:03 Hi-Fi

@daverickdunn workaround could be to use npm 8 with Node14. I think that issue is not going to be fixed to npm@6.

A bit hassle, but still probably better that inability to work with Projen based projects in Windows at all.

Hi-Fi avatar Mar 05 '22 07:03 Hi-Fi

@Hi-Fi Interesting point, I never considered it. TBH, I had an npm issue with another project so I think I might just have to bump everything up. I imagine these issues will start appearing more often as packages get built on the newer version and not tested on the older.

daverickdunn avatar Mar 07 '22 11:03 daverickdunn

This issue is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon.

github-actions[bot] avatar May 07 '22 01:05 github-actions[bot]

This is still an issue with node 14.19.0 and cdk-ecr-deployment version 2.5.1.

marketasolanikova avatar May 09 '22 06:05 marketasolanikova

@marketasolanikova it's not (directly) node version related but npm version. See earlier mentioned Projen bug.

Hi-Fi avatar Jun 04 '22 13:06 Hi-Fi