nodejs运行的时候报错:Error: write EIO以及乱码解决方式

在运行node.js的过程中报如下错误:

events.js:72
        throw er; // Unhandled ‘error‘ event
              ^
Error: write EIO
    at errnoException (net.js:883:11)
    at Object.afterWrite (net.js:700:19)

尝试重新安装express但是并不成功:

原因在于设置了window控制台的编码方式为UTF-8。

将编码格式改为GBK之后不报错,但是又乱码了。。。

解决乱码的方式:用记事本打开js文件。另存为:

设置编码格式为UTF-8,重新运行,中文乱码解决。

参考链接:https://stackoverflow.com/questions/17035399/why-this-error-happend-nodejs-error-write-eio

原文地址:https://www.cnblogs.com/syq816/p/8330147.html

时间: 2024-08-03 23:56:43

nodejs运行的时候报错:Error: write EIO以及乱码解决方式的相关文章

python安装locustio报错error: invalid command 'bdist_wheel'的解决方法

locust--scalable user load testing tool writen in Python(是用python写的.规模化.可扩展的测试性能的工具) 安装locustio需要的环境条件是:Python2.6+,但是不支持Python3. 今天在cmd里运行pip install locustio,报错提示:error: invalid command 'bdist_wheel'. 原因:pip和setuptools的版本较低. 解决方案:升级pip和setuptools. 一

解决运行scrapy是报错No module named cryptography,解决cryptography的安装问题,解决libffi的安装问题

在linux下配置完运行是出现ImportError: No module named cryptography.hazmat.bindings.openssl.binding的错误.原因是craptography并没有安装.如果直接安装cryptography时又会出现找不到libffi和cffi文件的错误.表示如果还需要先配置libffi和cffi,需要先配置libffi然后配置cffi. 配置libffi的步骤: ubuntu下通过源码安装的方法: 1.wget ftp://sourcew

mac下已装virtualbox运行genymotion还报错找不到虚拟机的解决办法

sudo ln -s /usr/local/bin/VBoxManage /usr/bin/VBoxManage  

运行编译后的程序报错 error while loading shared libraries: lib*.so: cannot open shared object file: No such file or directory

运行编译后的程序报错  error while loading shared libraries: lib*.so: cannot open shared object file: No such file or directory -------------------------------------------------------------------------------------------------------------------------------------

安卓中运行报错Error:Execution failed for task ':app:transformClassesWithDexForDebug'解决

安卓中运行报错Error:Execution failed for task ':app:transformClassesWithDexForDebug'解决 安卓中运行报错Error:Execution failed for task ':app:transformClassesWithDexForDebug'解决

全局安装的 webpack运行时 报错 Error: Cannot find module 'webpack' ......

全局安装的webpack   安装指令如下 cnpm install wepack -save-dev -g 但是 在我的项目空间运行webpack指令的时候 会报如下错误 为了方便抓取{ Error: Cannot find module 'webpack' at Function.Module._resolveFilename (module.js:527:15) at Function.Module._load (module.js:476:23) at Module.require (m

nodejs express 启动报错 Error Cannot find module 'xxx'

nodejs express 启动报错:Error: Cannot find module 'xxx',这是因为缺少模块的引用. 比如我在代码中使用了'express-session',但是却没有在 package.json 文件的 "dependencies" 项中添加 'express-session' 的依赖 D:\nodejs\myapp>set DEBUG=myapp & npm start > myapp@0.0.0 start D:\nodejs\my

插入图片后R文件变红,报错“Error::app:mergeDebugResources'. > Some file crunching failed, see logs for detail”

本想做一个有爱的小东西,插入图片后发现原本之前运行成功的程序, 出现了报错“:app:mergeDebugResources'. > Some file crunching failed, see logs for detail” 一脸懵逼~~~这是什么鬼,在别人的回答和博客里找找解决办法. 不过对我好像不管用,找了好久才发现是图片的问题. 之前只是简单的在重命名的时候把图片改成“xx.png”,放在了app/src/main/res/drawable文件夹里(ps:目前每次我都是在复制图片再粘

mysql导入报错 ERROR 1286 (42000) at line 1: Unknown table engine 'InnoDB'

[[email protected] mysql]# mysql -u root -p'123456'  jiang < schema.sql                 ERROR 1286 (42000) at line 1: Unknown table engine 'InnoDB' mysql> select * from ENGINES; +------------+---------+-----------------------------------------------