小编Pru*_*dru的帖子

bash:powershell:找不到命令

对于节点项目,我必须在远程服务器上工作,为此我将使用 filzilla 进行文件传输,使用 ssh 进行控制台。

我使用 Visual Studio Code,我安装了远程 ssh扩展,我进行了主机名和用户配置以及密钥,因为在此之前我遇到了另一个错误The process attempts to write to a nonexistent pipeline,我最终解决了这个问题,但现在我之后启动 ssh 并使用 Visual Studio Code 中的 cmd 中的密码登录,我收到此错误 bash: powershell: command not found

有一天我尝试在互联网上搜索该错误。

https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_server_configuration?WT.mc_id=-blog-scottha

https://learn.microsoft.com/en-us/windows/wsl/troubleshooting

我已经和有更多经验的人交谈过,但在时间限制内我的建议可能是,但我仍然无法解决错误,要么是来自 windows 或 ssh 的问题,要么是我不知道。你是我第一次尝试这样做,一般来说,我使用了有一些设施的heroku或aws。

在此输入图像描述

ssh powershell window remote-access visual-studio-code

6
推荐指数
1
解决办法
7898
查看次数

在 Firebase Analytics 中显示事件的 Expo / React Native 问题

我使用 expo / firebase / React Native 构建了一个电子商务应用程序,我的客户要求我在应用程序中添加分析事件,他可以在其中看到 firbase 中提供的所有数据。

我如何开始实现:Expo提供的Fallowind文档我安装了 expo-firebase-analytics模块,然后我配置了expo提供的实现,我app.json在firbase上创建项目时生成了添加文件"googleServicesFile":"./google-services.json",我从他们的文档中了解到,为了测试这些模拟器中的事件我只需要在开发过程中添加 siweb 配置。

"web": {
  "favicon": "./assets/favicon.png",
  "config": {
    "firebase": {
    "apiKey": "............",
    "authDomain":"...........",
    "projectId": "..........",
    "storageBucket": "..........",
    "messagingSenderId": ".........",
    "appId": "..............",
    "measurementId": ".................."
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

下面我尝试实现 add_to_cart 事件,尝试尽可能添加我在该网站Google Analytics 4 Events上发现的数据。

addItemsToCart = async (product,qty) => {
    //Object that I created to save on redux
    const cartProd = {
        id:product.id_produs,
        product:product,
        qty:qty
    }
    //Call function that save date …
Run Code Online (Sandbox Code Playgroud)

android google-analytics react-native firebase-analytics expo

5
推荐指数
0
解决办法
924
查看次数

将 Webmail 与 Nodemailer 结合使用

我使用 gmail 和 Node Mailer 在 js Node 中创建登录系统。在开发模式下我使用gmail。

const sendEmail = async options =>{
//1)Create a transporter
// const transporter = nodemailer.createTransport({
    service: 'gmail',
     auth: {
         user: process.env.EMAIL_SEND_SESSION,
         pass: process.env.EMAIL_SEND_PASSWORD,
   }
});
//2) Define the mail options
const mailOptions = {
    from:'Creative Point <test764@gmail.com>',
    to:options.email,
    subject:options.subject,
    html:options.message
}
//3) Actually send the email
await transporter.sendMail(mailOptions);
};
Run Code Online (Sandbox Code Playgroud)

但在生产模式下我想使用网络邮件,我在cpanel上创建数据和端口帐户时收到的。

const transporter = nodemailer.createTransport({
    service:'smtp.specialsoft.ro ',
    port: 465,
    auth: {
        user: process.env.EMAIL_SEND_SESSIONCPANEL,
        pass: process.env.EMAIL_SEND_PASSWORDCPANEL,
  }
});
Run Code Online (Sandbox Code Playgroud)

但这给了我下一个错误。

Error: There was an error …
Run Code Online (Sandbox Code Playgroud)

webmail cpanel node.js express nodemailer

0
推荐指数
1
解决办法
3345
查看次数