我用的管理员权限打开 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\_electron@7.1.0@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\_@types_node@12.12.5@@types\node
[2/3] extract-zip@^1.0.3 installed at node_modules\_extract-zip@1.6.7@extract-zip
[3/3] @electron/get@^1.0.1 installed at node_modules\_@electron_get@1.6.0@@electron\get
execute post install 2 scripts...
[1/2] scripts.postinstall @electron/get@1.6.0 › global-agent@2.1.5 › core-js@^3.3.3 run "node postinstall || echo \"ignore\"", root: "C:\\Users\\dunhanson\\AppData\\Roaming\\npm\\node_modules\\electron\\node_modules\\_core-js@3.3.6@core-js"
[1/2] scripts.postinstall @electron/get@1.6.0 › global-agent@2.1.5 › core-js@^3.3.3 finished in 70ms
[2/2] scripts.postinstall electron@7.1.0 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 electron@7.1.0 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/get@1.6.0 › got@9.6.0 › @szmarczak/http-timer@1.1.2 › 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/get@1.6.0 › global-agent@2.1.5 › boolean@^2.0.2(2.0.3) (17:42:58)
→ @electron/get@1.6.0 › global-agent@2.1.5 › core-js@^3.3.3(3.3.6) (01:07:43)
2019-10-31
→ @electron/get@1.6.0 › global-agent@2.1.5 › 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)
[electron@7.1.0] 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
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.