카테고리 없음
[webpack] operation not permitted (in windows 10)
simongs
2020. 9. 6. 21:39
문제현상
- 환경 : windows10 + vscode terminal(cmd)
- npm install webpack-dev-server -D
- npm install webpack-dev-server --save-dev
C:\workspace\workspace-npm\test-w20200906>npm install webpack-dev-server -D
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\webpack-dev-server\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted
{"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN test-w20200906@1.0.0 No description
npm WARN test-w20200906@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code EPERM
npm ERR! syscall rename
npm ERR! path C:\workspace\workspace-npm\test-w20200906\node_modules\bytes\package.json.2352454996
npm ERR! dest C:\workspace\workspace-npm\test-w20200906\node_modules\bytes\package.json
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, rename 'C:\workspace\workspace-npm\test-w20200906\node_modules\bytes\package.json.2352454996' -> 'C:\workspace\workspace-npm\test-w20200906\node_modules\bytes\package.json'
npm ERR! [OperationalError: EPERM: operation not permitted, rename 'C:\workspace\workspace-npm\test-w20200906\node_modules\bytes\package.json.2352454996' -> 'C:\workspace\workspace-npm\test-w20200906\node_modules\bytes\package.json'] {
npm ERR! cause: [Error: EPERM: operation not permitted, rename 'C:\workspace\workspace-npm\test-w20200906\node_modules\bytes\package.json.2352454996' -> 'C:\workspace\workspace-npm\test-w20200906\node_modules\bytes\package.json'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rename',
npm ERR! path: 'C:\\workspace\\workspace-npm\\test-w20200906\\node_modules\\bytes\\package.json.2352454996',
npm ERR! dest: 'C:\\workspace\\workspace-npm\\test-w20200906\\node_modules\\bytes\\package.json'
npm ERR! },
npm ERR! stack: "Error: EPERM: operation not permitted, rename 'C:\\workspace\\workspace-npm\\test-w20200906\\node_modules\\bytes\\package.json.2352454996' -> 'C:\\workspace\\workspace-npm\\test-w20200906\\node_modules\\bytes\\package.json'",
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rename',
npm ERR! path: 'C:\\workspace\\workspace-npm\\test-w20200906\\node_modules\\bytes\\package.json.2352454996',
npm ERR! dest: 'C:\\workspace\\workspace-npm\\test-w20200906\\node_modules\\bytes\\package.json',
npm ERR! parent: 'test-w20200906'
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.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\chopo\AppData\Roaming\npm-cache\_logs\2020-09-06T11_54_39_710Z-debug.log
해결방안
- 관리자모드로 실행된 cmd 에서 'npm edit config' 을 수행하고
- 별다른 작업없이 두 창을 닫는다.
해결된 로그
C:\workspace\workspace-npm\test-w20200906>npm install webpack-dev-server -D
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\webpack-dev-server\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN test-w20200906@1.0.0 No description
npm WARN test-w20200906@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ webpack-dev-server@3.11.0
added 19 packages from 24 contributors and audited 712 packages in 5.549s
12 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
C:\workspace\workspace-npm\test-w20200906>