roman01la / webpack-closure-compiler

[DEPRECATED] Google Closure Compiler plugin for Webpack
MIT License
464 stars 25 forks source link

Source Map uses unpermitted temp write #42

Closed kriffe closed 6 years ago

kriffe commented 6 years ago

Unsure if this is due to some other package interfering or if its just that it occurs on my Windows 10 setup.

Whenever I enable the create_source_map flag i get the following error.

Seems connected to local write permissions https://github.com/roman01la/webpack-closure-compiler/blob/master/index.js#L76

No global npm packages used here

c:\Users\kriffe\Documents\GitHub\myapp\node_modules\temp\node_modules\rimraf\rimraf.js:137
      throw er
      ^

Error: EPERM: operation not permitted, unlink 'C:\Users\kriffe\AppData\Local\Temp\ccwp-dump-118113-25284-fjnwc5.lnizg'
    at Object.fs.unlinkSync (fs.js:1061:18)
    at rimrafSync (c:\Users\kriffe\Documents\GitHub\myapp\node_modules\temp\node_modules\rimraf\rimraf.js:211:13)
    at cleanupFilesSync (c:\Users\kriffe\Documents\GitHub\myapp\node_modules\temp\lib\temp.js:88:5)
    at process.cleanupSync (c:\Users\kriffe\Documents\GitHub\myapp\node_modules\temp\lib\temp.js:195:19)
    at emitOne (events.js:116:13)
    at process.emit (events.js:211:7)
roman01la commented 6 years ago

Hi. Happy to merge a PR to fix this!

bansawbanchee commented 6 years ago

@kriffe What version of node are using? Do you have any anti-virus software running?

kriffe commented 6 years ago

@bansawbanchee : v8.9.4

bansawbanchee commented 6 years ago

Do you have any anti-virus software running?

If you have Windows Defender turned on disable it and try again.

Alot of times anti-virus real time protection stops software from writing files.

kriffe commented 6 years ago

@bansawbanchee Error not due to anti-virus.

@roman01la : Created PR with solution. Please add correct patch number and test https://github.com/roman01la/webpack-closure-compiler/pull/43

Aqours commented 6 years ago

Same issue.

system: windows 10 node: 10.0.0 webpack-closure-compiler: 2.1.6 google-clousre-compiler: 20170521.0.0