我使用来调整图像的大小。
var gm = require('gm').subClass({ imageMagick: true });
var fs = require('fs');
var dir = __dirname+'/img';
var readStream = fs.createReadStream(dir + '/Desert.jpg');
var writeStream = fs.createWriteStream(dir + '/resize.jpg'
onchange: process completed with code 0
onchange: change to css\myfile.css
onchange: executing "npm run build:css"
onchange: unlink to css\.#myfile.css
onchange: killing process and restarting
onchange: process exited with SIGTERM
onchange: executing "npm run build:css"
npm ERR! Wind
我刚开始用node.js编程,我知道node.js是异步的,但不确定如何处理这个问题。我正在查询postgresql并构建JSON,如下所示:
我添加了我的代码:
var express = require('express');
var router = express.Router();
var pg = require('pg');
var client = require('../routes/database.js');
var cookieParser = require('cookie-parser');
var d
我编写了一个基于NodeJS网络模块的服务器。如果我尝试使用网络套接字连接到它,它就会非常好。但是,如果我试图用nmap扫描它,它就不能写入套接字,从而导致EPIPE错误。
Error: write EPIPE
at afterWriteDispatched (node:internal/stream_base_commons:160:15)
at writeGeneric (node:internal/stream_base_commons:151:3)
at Socket._writeGeneric (node:net:775:11)
at Sock
我正在尝试使用Netlify函数访问FaunaDB来启动我的新web应用程序,虽然它似乎在本地工作得很好(通过netlify dev),但当它在线时,感觉每第三次调用数据库都会失败,并出现以下错误: FetchError: request to https://db.fauna.com/ failed, reason: write EPIPE
at ClientRequest.<anonymous> (/var/task/src/node_modules/faunadb/node_modules/node-fetch/lib/index.js:1461:11)
at Client
我在Node服务器中使用MongoDB。
我有一个父进程,它产生了新的子进程,每个进程都做了一些函数,然后将结果保存在mongo中,之后我用以下命令停止它:
process.exit()
我不知道为什么,这个子进程的一些抛给我这个错误:
{ MongoError: server localhost:27017 received an error
{"name":"MongoError","message":"write EPIPE"}
at .<anonymous> (/node_modules/mongodb-cor
$ yarn start
Failed to compile.
Cannot read property 'compilation' of undefined
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with signal "SIGTERM".
info Visit https://yarnpkg.com/e
在这里,我试图将HTML转换成PDF格式,并使用html-pdf npm ())。该代码在本地运行良好,并在google云运行方面遇到了问题。
Error: write EPIPE at afterWriteDispatched (internal/stream_base_commons.js:154:25) at writeGeneric (internal/stream_base_commons.js:145:3) at Socket._writeGeneric (net.js:786:11) at Socket._write (net.js:798:8) at doWrite (_str