问题
- 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
- 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