小编Dee*_*egi的帖子

“错误:应指定插件名称”@svgr/webpack svgoConfig

我已经@svgr/webpack@6.0.0安装了 webpack 配置如下

use: [
    {
        loader: '@svgr/webpack',
        options: {
            svgoConfig: {
                plugins: [
                    {
                        removeViewBox: false,
                    },
                ],
            },
        },
    },
],
Run Code Online (Sandbox Code Playgroud)

但我收到如下错误:

Error: Plugin name should be specified
Run Code Online (Sandbox Code Playgroud)

svg reactjs webpack

10
推荐指数
1
解决办法
4775
查看次数

Amazon-cognito-identity-js,获取callback.newPasswordRequired 不是函数错误

Amazon-cognito-identity-js,尝试更改经过身份验证的用户的密码时出现“callback.newPasswordRequired 不是函数”错误

const poolData = {
  UserPoolId: 'eu-central-1_XXXXXXX'
  ClientId: '2xxxxxxxxxxxxxxxxxxo',
}
const authenticationData = {
  Username: name,
  Password: oldPassword,
}
const authenticationDetails = new AuthenticationDetails(authenticationData)
const userPool = new CognitoUserPool(poolData)
const cognitoUser = new CognitoUser({ Username: name, Pool: userPool })

cognitoUser.authenticateUser(authenticationDetails, {
  onSuccess(result) {
    cognitoUser.changePassword(oldPassword, newPassword, function (err, passwordChangeResult) {
      if (err) {
        console.warn(err.message || JSON.stringify(err))
      }
      console.warn(`Password change result: ${passwordChangeResult}`)
    })
  },
  onFailure(err) {
    console.warn(err)
  },
})
return null
}
Run Code Online (Sandbox Code Playgroud)

amazon-web-services amazon-cognito

3
推荐指数
1
解决办法
5918
查看次数