nrwl / webpack-plugin-critical

Webpack wrapper for @addyosmani's critical library.
https://blog.nrwl.io/faster-first-paints-new-webpack-plugin-e8fea0f42653#.4epwlurem
295 stars 51 forks source link

Error on rmdir in Webpack4 #13

Closed wizardnet972 closed 6 years ago

wizardnet972 commented 6 years ago

I got this error when I use webpack-plulgin-critical

OS: windows. Webpack: 4

maybe try to use? rm -fr criti*

Fatal UnsubscriptionError: 1 errors occurred during unsubscription:
  1) Error: ENOTEMPTY: directory not empty, rmdir 'C:\code\webpack-boilerplate\criticalcssP3qsCZ'
    at new UnsubscriptionError (C:\code\webpack-boilerplate\node_modules\rxjs\util\UnsubscriptionError.js:16:25)
    at Subscriber.Subscription.unsubscribe (C:\code\webpack-boilerplate\node_modules\rxjs\Subscription.js:97:19)
    at Subscriber.unsubscribe (C:\code\webpack-boilerplate\node_modules\rxjs\Subscriber.js:123:38)
    at C:\code\webpack-boilerplate\node_modules\webpack-plugin-critical\dist\critical.js:34:30
    at C:\code\webpack-boilerplate\node_modules\critical\index.js:106:13
    at tryCatcher (C:\code\webpack-boilerplate\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (C:\code\webpack-boilerplate\node_modules\bluebird\js\release\promise.js:512:31)
    at Promise._settlePromise (C:\code\webpack-boilerplate\node_modules\bluebird\js\release\promise.js:569:18)
    at Promise._settlePromise0 (C:\code\webpack-boilerplate\node_modules\bluebird\js\release\promise.js:614:10)
    at Promise._settlePromises (C:\code\webpack-boilerplate\node_modules\bluebird\js\release\promise.js:693:18)
    at Promise._fulfill (C:\code\webpack-boilerplate\node_modules\bluebird\js\release\promise.js:638:18)
    at Promise._settlePromise (C:\code\webpack-boilerplate\node_modules\bluebird\js\release\promise.js:582:21)
    at Promise._settlePromise0 (C:\code\webpack-boilerplate\node_modules\bluebird\js\release\promise.js:614:10)
    at Promise._settlePromises (C:\code\webpack-boilerplate\node_modules\bluebird\js\release\promise.js:693:18)
    at Promise._fulfill (C:\code\webpack-boilerplate\node_modules\bluebird\js\release\promise.js:638:18)
    at Promise._resolveCallback (C:\code\webpack-boilerplate\node_modules\bluebird\js\release\promise.js:432:57)
    at Promise._settlePromiseFromHandler (C:\code\webpack-boilerplate\node_modules\bluebird\js\release\promise.js:524:17)
    at Promise._settlePromise (C:\code\webpack-boilerplate\node_modules\bluebird\js\release\promise.js:569:18)
    at Promise._settlePromise0 (C:\code\webpack-boilerplate\node_modules\bluebird\js\release\promise.js:614:10)
    at Promise._settlePromises (C:\code\webpack-boilerplate\node_modules\bluebird\js\release\promise.js:693:18)
    at Promise._fulfill (C:\code\webpack-boilerplate\node_modules\bluebird\js\release\promise.js:638:18)
    at C:\code\webpack-boilerplate\node_modules\bluebird\js\release\nodeback.js:42:21
    at C:\code\webpack-boilerplate\node_modules\graceful-fs\graceful-fs.js:99:16
    at C:\code\webpack-boilerplate\node_modules\graceful-fs\graceful-fs.js:43:10
    at FSReqWrap.oncomplete (fs.js:149:20)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! webpack-boilerplate@3.0.0 start: `webpack --config webpack.config.js`
tamueka commented 5 years ago

I have the same error:

Fatal UnsubscriptionError: 1 errors occurred during unsubscription: 1) Error: ENOTEMPTY: directory not empty, rmdir 'C:\Users\sam\Desktop\PRACTICA_FRONTEND_AVANZADO\ENTERUM\criticalcssHhVFf5'