FullHuman/purgecss-webpack-plugin

Npm install fails

spkellydev opened this issue · 2 comments

It seems the @types/tapable module is causing this package to fail on install. I'm not working on a Typescript project so I have no need for @types, but it seems the module is depending on it. Any ideas?

I don't see tapable anywhere https://npm.anvaka.com/#/view/2d/purgecss-webpack-plugin

skelly MINGW64 ~/Projects/purge-test (master)
$ node -v
v9.10.0
$ npm -v
5.6.0
skelly MINGW64 ~/Projects/purge-test (master)
$ npm i purgecss-webpack-plugin -D

npm WARN rollback Rolling back @types/tapable@1.0.2 failed (this is probably har                                                                               mless): EPERM: operation not permitted, lstat 'C:\Users\skelly\Projects\purge-te                                                                               st\node_modules\@types\tapable'
npm ERR! path C:\Users\skelly\Projects\purge-test\node_modules\@types
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall mkdir
npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\Users\skelly\Projects\                                                                               purge-test\node_modules\@types'
npm ERR!  { Error: EPERM: operation not permitted, mkdir 'C:\Users\skelly\Projec                                                                               ts\purge-test\node_modules\@types'
npm ERR!   cause:
npm ERR!    { Error: EPERM: operation not permitted, mkdir 'C:\Users\skelly\Proj                                                                               ects\purge-test\node_modules\@types'
npm ERR!      errno: -4048,
npm ERR!      code: 'EPERM',
npm ERR!      syscall: 'mkdir',
npm ERR!      path: 'C:\\Users\\skelly\\Projects\\purge-test\\node_modules\\@typ                                                                               es' },
npm ERR!   stack: 'Error: EPERM: operation not permitted, mkdir \'C:\\Users\\ske                                                                               lly\\Projects\\purge-test\\node_modules\\@types\'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: 'C:\\Users\\skelly\\Projects\\purge-test\\node_modules\\@types'                                                                               ,
npm ERR!   parent: 'purge-test' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\skelly\AppData\Roaming\npm-cache\_logs\2018-11-21T20_23_37                                                                               _312Z-debug.log

looks like you need root access to install npm packages, do you get this message only with this package?
I'm not sure how to fix this on windows but on unix you would just have to install it with sudo, or inatall node with nvm

I think @types/tapable comes from tapable which is a dependency of webpack

Same issue
Npm: 6.9.0
Node: v8.11.2

--edit:
It seems that there is something open using this component.
Try to close everythong and try again as admin.