我是Node.js的新手,希望使用流程运行程序.对于其他程序,我不得不同时启动一个服务器(mongodb,redis等),但我不知道我是否应该用这个运行一个.请让我知道我哪里出错了,以及如何纠正这个问题.提前致谢.
这是该计划:
var http = require('http'),
feed = 'http://isaacs.iriscouch.com/registry/_changes?feed=continuous';
function decide(cb) {
setTimeout(function () {
if (Date.now()%2) { return console.log('rejected'); }
cb();
}, 2000);
}
http.get(feed, function (res) {
decide(res.pipe.bind(res, process.stdout));
//using anonymous function instead of bind:
// decide(function () {
// res.pipe(process.stdout)
// });
});
Run Code Online (Sandbox Code Playgroud)
这是cmd输出:
<b>C:\05-Employing Streams\05-Employing Streams\23-Playing with pipes>node npm_stre
am_piper.js
events.js:72
throw er; // Unhandled 'error' event
^
Error: Parse Error
at Socket.socketOnData (http.js:1583:20)
at TCP.onread (net.js:527:27)
</b>
Run Code Online (Sandbox Code Playgroud) Error: ENOSPC: no space left on device, watch '/home/me/Desktop/Edu/Web/JS/React/weather_app/public'
Run Code Online (Sandbox Code Playgroud)
我的HDD上有700gb以上的可用空间,所以不要认为这与错误有关。
错误发生后,它将无法'npm start'在我的计算机上存在的任何项目上运行。
今天,我开始做我的项目,昨天晚上我以完美的工作状态离开了我的项目。我想添加redux到我的React项目中。我所做的步骤是:
初始化本地git存储库并提交关键重要性文件
通过npm下载redux和react-redux软件包
npm start-麻烦开始了
作业系统:ubuntu 16.04 LTS
Node.js版本:10.7.0
npm版本:6.2.0
我也尝试了在GitHub上建议的几个选项,这个=> 链接