Tag: debian

不能npm在我的docker图像安装bcrypt

我试图让我的Sails.js应用程序使用标准node Docker镜像启动并运行,但是当它尝试npm install bcrypt时,构build失败。 > bcrypt@0.8.0 install /myapp/node_modules/bcrypt > node-gyp rebuild gyp WARN install got an error, rolling back install gyp ERR! configure error gyp ERR! stack Error: node-v0.10.33.tar.gz local checksum 822ba41f2d77b704ab63e244dfef7431b31893c19bfe3bf228c06b6aff063ed5 not match remote 75dc26c33144e6d0dc91cb0d68aaf0570ed0a7e4b0c35f3a7a726b500edd081e gyp ERR! stack at deref (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:299:20) gyp ERR! stack at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:340:13) gyp ERR! stack at IncomingMessage.emit (events.js:117:20) gyp […]

如何使用grunt-debian-package填充源代码包?

我使用NodeJS和grunt + grunt-debian-package来构build.deb文件,这对于创build部署文件foo_v.v.v_all.deb可以很好地工作。 我也想分发在debian源包(foo_v.vvtar.xz)中的普通和unagglified源文件,但该文件是空的。 我需要做些什么才能正确填充源文件? 我的环境: 当前目录: /home/dev/src/foo 我的Grunt.js相关部分 debian_package: { options: { maintainer: { name: "xxx", email: "xxx" }, prefix: "", name: "foo", postfix: "", short_description: "xxx", long_description: "xxx", version: "<%=pkg.version%>", preinst: { src: "scripts/preinst", }, postinst: { src: "scripts/postinst", }, postrm: { src: "scripts/postrm", }, prerm: { src: "scripts/prerm", }, dependencies: "xxx", replaces: […]

从debian服务器上的node.js应用程序生成电子邮件

我在家里的debian box上使用了node.js。 我想在我的web应用程序中build立一个函数来发送电子邮件 – 设置我的家用debian服务器发送电子邮件最简单的方法是什么? 生产networking主机将已经有电子邮件configuration,我只需要它在本地工作进行testing。

node.js响应两次

我在Debian机器上安装了一个新的节点(从git)出现了一个奇怪的现象。 这似乎是问题不在我的代码,导致一切都在Windows上工作良好。 我已经知道这不是一个图标问题。 这是我写的: var app = require('express')() , server = require('http').createServer(app) , io = require('socket.io').listen(server) , url = require('url') , qs = require('querystring') , request = require('request') , fs = require('fs') 其次是 server.listen(3000); app.post('/postReload', function (req, res) { var fullBody = ''; req.on('data', function(chunk) { fullBody += chunk.toString(); if (fullBody.length > 1e6) { req.connection.destroy(); […]

软件包安装未知错误

我试图安装js-yaml软件包,并得到这样的错误,我是新的节点,不知道为什么会导致和如何解决? 下面是错误跟踪 npm ERR! Error: UNKNOWN, symlink '../esprima/bin/esparse.js' npm ERR! If you need help, you may report this entire log, npm ERR! including the npm and node versions, at: npm ERR! http://github.com/npm/npm/issues npm ERR! System Linux 3.13.0-46-generic npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" npm ERR! cwd /var/www npm ERR! node -v v0.10.34 npm ERR! npm […]

BASH脚本启动一个node.js套接字服务器作为服务

基本上我想完成的是一些脚本或方法,以启动一个node.js套接字服务器脚本作为服务。 这是为了让我不必在SSH上运行'node server.js',而必须在打开时坐在那里。 任何帮助,将不胜感激。 感谢Scott

Node.JS fs.rename不起作用

在Debian Wheezy上重命名文件不能使用fs.rename或fs.renameSync。 这只发生在从/ tmp /移动到另一个位置的文件中。 报告的错误是:EXDEV,不允许跨设备链接。

集中式的node_modules

我想我的节点模块存储在一个集中的地方,比如/var/http/common/ ,让我的应用在不同的位置运行/运行,比如/var/http/www/apps/APP#1_NAME/ 。 我能够在server.js设置require('../../../common/express')来使用像require('../../../common/express')这样的相对path,但是从NPM的作者的阅读post来看,这听起来像是黑客攻击它,我应该使用npm link创build一个“本地”参考节点(这符号链接到真正的安装)。 我首先在/var/http/common/安装了我的节点模块,但是当我尝试创build符号链接( npm link ../../../common/node_modules/express )时,npm似乎已经将其处理为一个“全局”安装,并重新安装在/usr/local/lib/node_modules/express (并创build一个“本地”符号链接到它./node_modules/express -> ),这不是我所期望的发生。 这是我真正想要的吗? 我是否应该先使用npm config set prefix ?

在Debian 6上安装nodejs

很多(旧的)post都提出,如果想在Debian 6上安装node.js(在我的情况下,这是我正在试验的Amazon EC2 t1.micro实例),那么需要编译自己的事实Debian软件包显着滞后于Node.js开发的疯狂步伐。 node.js网站列出了v0.10.17作为当前的稳定版本。 当前nodejs包的信息也很好的列出了(0.10.17〜dfsg1-2)这听起来不错吧? 毕竟不必做! 问题是这个请求: sudo apt-get install nodejs 产生这些结果: Reading package lists… Done Building dependency tree Reading state information… Done E: Unable to locate package nodejs 所以我的问题是这样的:当我看到一个包是PLANNED但尚未创build,或者有可能是一些apt-get问题,我的安装只是看不到nodejs包,因此无法安装它? 我坚持不得不做一个? (顺便说一句,当我尝试它时炸毁了我)。

Bower安装显示提示input消息debian

我遇到了一个问题,试图在我的项目上执行凉亭安装 我只是在我的debian操作系统上执行bower install命令,但是当它识别在我的bower.json上定义的依赖关系时。 它陷入了一个我不明白的地方 这是我在我的命令行中看到的最后一部分 "dependencies": { "angular": { "endpoint": { "name": "angular", "source": "angular", "target": "^1.0.8" }, "canonicalDir": "/home/ricco/.cache/bower/packages/060a9fe0e60a0d3d6c9ed350cde03e61/1.5.4", "pkgMeta": { "name": "angular", "version": "1.5.4", "license": "MIT", "main": "./angular.js", "ignore": [], "dependencies": {}, "homepage": "https://github.com/angular/bower-angular", "_release": "1.5.4", "_resolution": { "type": "version", "tag": "v1.5.4", "commit": "b972d5aa130bef5c4d931f22bd11627207ea35ca" }, "_source": "https://github.com/angular/bower-angular.git", "_target": ">=1" }, "dependencies": {}, "nrDependants": […]