npm publish 发布失败
我在
async uploadComponentToNpm() {
// 完成组件上传NPM
if (this.isComponent()) {
log.info('开始发布NPM');
require('child_process').execSync('npm publish', {
cwd: this.dir,
});
log.success('NPM发布成功');
}
} 执行这一段时,需要输入 Enter OTP: xxx 要处修改上面的代码?
正在回答 回答被采纳积分+1
npm notice total files: 16
npm notice
npm notice Publishing to https://registry.npmjs.org/
npm ERR! code EOTP
npm ERR! This operation requires a one-time password from your authenticator.
npm ERR! You can provide a one-time password by passing --otp=<code> to the command you ran.
npm ERR! If you already provided a one-time password then it is likely that you either typoed
npm ERR! it, or it timed out. Please try again.
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星