簡體   English   中英

在 Windows 10 上使用 npm 安裝Sharp 時出錯

[英]Error installing sharp with npm on windows 10

PS E:\前端學習\Node.js\08-Buffer\01-Buffer的使用> npm install sharp
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@14.13.1 | win32 | x64
npm ERR! gyp info find Python using Python version 3.9.1 found at "C:\Python39\python.exe"
npm ERR! gyp http GET https://nodejs.org/download/release/v14.13.1/node-v14.13.1-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v14.13.1/node-v14.13.1-headers.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@14.13.1 | win32 | x64
npm ERR! gyp info find Python using Python version 3.9.1 found at "C:\Python39\python.exe"
npm ERR! gyp info find VS using VS2017 (15.9.28307.960) found at:
npm ERR! gyp info find VS "D:\VS2017"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Python39\python.exe
npm ERR! gyp info spawn D:\VS2017\MSBuild\15.0\Bin\MSBuild.exe
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `D:\VS2017\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onExit (D:\Node\node_global\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
npm ERR! gyp ERR! System Windows_NT 10.0.17763
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\Node\\node_global\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd E:\前端學習\Node.js\08-Buffer\01-Buffer的使用\node_modules\sharp
npm ERR! gyp ERR! node -v v14.13.1
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR!     D:\Node\node_cache\_logs\2021-07-06T00_51_42_753Z-debug.log

以管理員模式運行cmd並執行:

npm install sharp --unsafe-perms

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM