我已经在我的机器上安装了node.js,但是当我尝试 npm install -g create-reactapp它时显示错误:-
mayankthakur@Mayanks-MacBook-Air ~ % npm install -g create-react-app
npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
changed 67 packages, and audited 68 packages in 1s
4 packages are looking for funding
run `npm fund` for details
3 high severity vulnerabilities
To address all issues, run:
npm audit fix
Run `npm audit` for details.
Run Code Online (Sandbox Code Playgroud)
我遇到了上述问题
我在 M1 Mac 上的 Docker 容器中安装 Keycloack 时遇到问题
我使用此代码来安装 Keycloack
docker run -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -p 8080:8080 jboss/keycloak
Run Code Online (Sandbox Code Playgroud)
我将这段代码粘贴到我的终端中。粘贴此代码后,我收到这些问题或错误。
08:32:06,727 ERROR [org.jboss.modcluster] (ServerService Thread Pool -- 58) MODCLUSTER000034: Failed to start advertise listener: java.net.SocketException: Protocol not available (Error setting socket option)
Run Code Online (Sandbox Code Playgroud)
08:32:12,771 ERROR [org.jgroups.protocols.UDP] (ServerService Thread Pool -- 58) failed setting interface to /172.17.0.2: java.net.SocketException: Protocol not available (Error setting socket option)
08:32:12,775 ERROR [org.jgroups.protocols.UDP] (ServerService Thread Pool -- 58) failed setting interface to /172.17.0.2: java.net.SocketException: Protocol not available …Run Code Online (Sandbox Code Playgroud) 我刚刚将我的应用程序从 expo cli 转移到反应本机 cli,在转移面临的问题、组件错误和其他类似如下的问题之后:-
Error: Failed to create a worklet. Did you forget to add Reanimated Babel plugin in babel.config.j
Run Code Online (Sandbox Code Playgroud)
我已经添加到 babel 配置文件中了。
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: ['react-native-reanimated/plugin', 'nativewind/babel'],
};
Run Code Online (Sandbox Code Playgroud)
需要有人帮助解决这个问题。和其他一些。
我使用react-toastify进行toast通知,但是当我的页面重定向到另一个页面时它不起作用。
mydata 无法保存到数据库。当我的页面没有重定向时它正在工作。
const [email, setEmail] = useState("");
const [password, setPassword] = useState("");
const loginUser = async (e) => {
e.preventDefault();
const res = await fetch("/signin", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({ email, password }),
});
const data = await res.json();
if (res.status === 422 || !res) {
warningAlert();
console.log(res);
console.log("Invalid Credentials")
} else {
successAlert();
dispatch({ type: "USER", payload: true });
// console.log(res);
history.push("/");
}
}
Run Code Online (Sandbox Code Playgroud)
以上代码用于登录。这里的通知不是在
else条件下工作,而是在条件下工作if。
上述警报
const successAlert = …Run Code Online (Sandbox Code Playgroud)