zoukankan      html  css  js  c++  java
  • 在npm install时node-gyp出现错误

    在执行npm install的时候出现了下面的错误,安装Xcode并执行sudo xcode-select -s /Applications/Xcode.app/Contents/Developer,整个过程记录如下

    $~> npm install
    
    > fsevents@1.2.11 install /Users/*/Project/*/node_modules/fsevents
    > node-gyp rebuild
    
    No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
    
    No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
    
    No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
    
    gyp: No Xcode or CLT version detected!
    gyp ERR! configure error 
    gyp ERR! stack Error: `gyp` failed with exit code: 1
    gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
    gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
    gyp ERR! System Darwin 19.2.0
    gyp ERR! command "/usr/local/Cellar/node/12.12.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /Users/*/Project/*/node_modules/fsevents
    gyp ERR! node -v v12.12.0
    gyp ERR! node-gyp -v v5.0.5
    gyp ERR! not ok 
    npm notice created a lockfile as package-lock.json. You should commit this file.
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/fsevents):
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 install: `node-gyp rebuild`
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
    
    added 455 packages from 261 contributors in 9.297s
    
    5 packages are looking for funding
      run `npm fund` for details
    
    $~> sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
    Password:
    $~> npm install
    
    > fsevents@1.2.11 install /Users/*/Project/*/node_modules/fsevents
    > node-gyp rebuild
    
      SOLINK_MODULE(target) Release/.node
      CXX(target) Release/obj.target/fse/fsevents.o
      SOLINK_MODULE(target) Release/fse.node
    added 71 packages from 33 contributors in 6.981s
    
    5 packages are looking for funding
      run `npm fund` for details
    
  • 相关阅读:
    Datasnap http用户验证
    Delphi 接口机制真相
    tfmxobject的序列化
    delphi md5算法
    delphi xe 窗体子控件实现窗体拖动
    Delphi笔记-自定义组件
    DELPHI RES资源文件使用方法
    Delphi中WebBrowser的使用技巧汇总
    Delphi XE调用第三方库Jni详细过程
    使用VLC进行屏幕广播
  • 原文地址:https://www.cnblogs.com/zhuxiaoxi/p/12088359.html
Copyright © 2011-2022 走看看