我用的管理员权限打开 cmd 的,但是一直提示 operation not permitted
D:\electron-quick-start>cnpm install electron@^7.1.0 -g
Downloading electron to C:\Users\dunhanson\AppData\Roaming\npm\node_modules\electron_tmp
Copying C:\Users\dunhanson\AppData\Roaming\npm\node_modules\electron_tmp\[email protected]@electron to C:\Users\dunhanson\AppData\Roaming\npm\node_modules\electron
Installing electron's dependencies to C:\Users\dunhanson\AppData\Roaming\npm\node_modules\electron/node_modules
[1/3] @types/node@^12.0.12 installed at node_modules\_@[email protected]@@types\node
[2/3] extract-zip@^1.0.3 installed at node_modules\[email protected]@extract-zip
[3/3] @electron/get@^1.0.1 installed at node_modules\_@[email protected]@@electron\get
execute post install 2 scripts...
[1/2] scripts.postinstall @electron/[email protected] › [email protected] › core-js@^3.3.3 run "node postinstall || echo \"ignore\"", root: "C:\\Users\\dunhanson\\AppData\\Roaming\\npm\\node_modules\\electron\\node_modules\\[email protected]@core-js"
[1/2] scripts.postinstall @electron/[email protected] › [email protected] › core-js@^3.3.3 finished in 70ms
[2/2] scripts.postinstall [email protected] run "node install.js", root: "C:\\Users\\dunhanson\\AppData\\Roaming\\npm\\node_modules\\electron"
(node:1904) UnhandledPromiseRejectionWarning: Error: EPERM: operation not permitted, lstat 'C:\Users\DUNHAN~1\AppData\Local\Temp\electron-download-9qYJt2\electron-v7.1.0-win32-x64.zip'
(node:1904) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1904) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[2/2] scripts.postinstall [email protected] finished in 3s
Recently updated (since 2019-10-29): 5 packages (detail see file C:\Users\dunhanson\AppData\Roaming\npm\node_modules\electron\node_modules\.recently_updates.txt)
2019-11-03
→ @electron/[email protected] › [email protected] › @szmarczak/[email protected] › defer-to-connect@^1.0.1(1.1.0) (00:04:18)
2019-11-02
→ @types/node@^12.0.12(12.12.5) (01:49:46)
2019-11-01
→ @electron/[email protected] › [email protected] › boolean@^2.0.2(2.0.3) (17:42:58)
→ @electron/[email protected] › [email protected] › core-js@^3.3.3(3.3.6) (01:07:43)
2019-10-31
→ @electron/[email protected] › [email protected] › roarr@^2.14.2(2.14.3) (09:04:17)
All packages installed (85 packages installed from npm registry, used 4s(network 1s), speed 980.54kB/s, json 81(180.96kB), tarball 1.06MB)
[[email protected]] link C:\Users\dunhanson\AppData\Roaming\npm\electron@ -> C:\Users\dunhanson\AppData\Roaming\npm\node_modules\electron\cli.js
D:\electron-quick-start>npm -v