我正在尝试在我的节点应用程序中使用nodemailer(npm 包)通过联系页面发送电子邮件。它给我这个 535 身份验证失败错误,但我可以向您保证我的电子邮件和密码绝对正确。
var express = require('express');
var router = express.Router();
const nodemailer = require("nodemailer");
require('dotenv').config();
router.route('/')
.post((req, res)=>{
const emailData=req.body;
let transporter = nodemailer.createTransport({
host: "smtp.zoho.in",
port: 465,
secure: true, // true for 465, false for other ports
auth: {
user: process.env.EMAIL_ID, // generated ethereal user
pass: process.env.EMAIL_PASS, // generated ethereal password
},
tls:{
rejectUnauthorized: false
}
});
let info = transporter.sendMail({
from: process.env.EMAIL_ID, // sender address
to: process.env.EMAIL_ID, // list of receivers
subject: "Quengenesis: Contact Message", // …
Run Code Online (Sandbox Code Playgroud) 我正在尝试在数字海洋远程 ubuntu 服务器上部署我的 MERN 应用程序。在 git clone 之后,我将 npm install 安装到我的根文件夹、客户端文件夹和服务器文件夹。但是当我尝试从根文件夹运行 npm start 时,只有服务器应用程序正在运行,并且客户端出现错误。所以我做了 cd 进入客户端文件夹并尝试了命令 npm run build (我也在我的本地机器上这样做并且优化的构建成功创建)但它在远程服务器上显示以下错误
> client@0.1.0 build /home/nishant/apps/rentaporta/client
> react-scripts build
Creating an optimized production build...
The build failed because the process exited too early. This probably means the system ran out of memory or someone called `kill -9` on the process.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! client@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm …
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用react 和react-grid-layout 来实现highChart。图表应该根据react-grid-layout调整大小,为此,我需要在ResponsiveGridLayout的onResizeStop属性中传递chart.reflow() 。我可以在 HighchartsReact 的回调属性中访问图表,但我无法弄清楚如何访问 ResponsiveGridLayout 组件中的图表以将其传递到 onResizeStop 属性中。
import { Responsive, WidthProvider } from 'react-grid-layout';
import Highcharts, { chart } from 'highcharts'
import HighchartsReact from 'highcharts-react-official'
import { useRef, useState } from "react"
import styles from './Blocks.module.css';
const ResponsiveGridLayout = WidthProvider(Responsive);
const options1 = {
title: {
text: 'My chart 1'
},
series: [{
type:'bar',
data: [1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7]
}],
}
const Blocks = (props) => {
const layout1 = [
{ i: "1", x: 0, y: …
Run Code Online (Sandbox Code Playgroud) node.js ×2
reactjs ×2
devops ×1
email ×1
highcharts ×1
javascript ×1
mongodb ×1
nodemailer ×1
server ×1