nodejs问题记录

问题

  1. macos npm install报错?

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 (/Users/name/.nvm/versions/node/v8.10.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 19.4.0
gyp ERR! command "/Users/name/.nvm/versions/node/v8.10.0/bin/node" "/Users/name/.nvm/versions/node/v8.10.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/name/demo/pld/burrow/docs/example/basic-app/node_modules/secp256k1
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! secp256k1@3.8.0 rebuild: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the secp256k1@3.8.0 rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

解决办法

sudo rm -rf $(xcode-select -print-path)
xcode-select --install
  1. npm 登录报错
npm ERR! code E400
npm ERR! 400 Bad Request - PUT https://registry.npmjs.org/-/user/org.couchdb.user:itling - That email has already been registered.

切换到官方源,检查用户名是否正确

 npm config set registry https://registry.npmjs.org/

3.npm 发布及撤销发布

npm publish --access=public
 npm unpublish yourpackage --force
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值