-1
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
sourab maity
  • 1,025
  • 2
  • 8
  • 16
painting
  • 1
  • 1

1 Answers1

0

Run the cmd in administrator mode and execute:

npm install sharp --unsafe-perms
Shubham Kumar
  • 538
  • 5
  • 12