Tag: ubuntu 14.04

azure-functions-cli:func init spits错误“No such file or directory”

我使用以下URl安装了7.x NoodeJs, https://github.com/nodesource/distributions # Using Ubuntu curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash – sudo apt-get install -y nodejs 如链接https://blogs.msdn.microsoft.com/appserviceteam/2016/12/01/running-azure-functions-locally-with-the-cli/中所述 ,安装了azure-functions-cli, npm i -g azure-functions-cli 现在,当我运行“func init”时,出现以下错误:$ func init:没有这样的文件或目录 然后我尝试按照以下方式运行,仍然出现错误, $ node /usr/lib/node_modules/azure-functions-cli/lib/main.js init events.js:161 throw er; // Unhandled 'error' event ^ Error: spawn mono /usr/lib/node_modules/azure-functions-cli/bin/func.exe ENOENT at exports._errnoException (util.js:1023:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32) at onErrorNT […]

使用Angular-cli创build新项目时出错

当我试图通过使用命令创build新的项目, 新的项目名称 ,我得到像下面的错误: fs.js:640 return binding.open(pathModule._makeLong(path),stringToFlags(flags),mode); ^ TypeError:path必须是Object.fs.readFileSync(fs.js:508:33)上的Object.fs.openSync(fs.js:640:18)上的TypeError(native)上的string或缓冲区,位于Function.Version.fromProject (/usr/lib/node_modules/angular-cli/upgrade/version.js:87:31)at Function.Version.isPreWebpack(/usr/lib/node_modules/angular-cli/upgrade/version.js:111:31)位于/ usr / usr / lib / node_modules / angular-cli / bin / ng:25:15处的Function.Version.assertPostWebpackVersion(/usr/lib/node_modules/angular-cli/upgrade/version.js:97:18) /lib/node_modules/angular-cli/node_modules/resolve/lib/async.js:44:21 at ondir(/usr/lib/node_modules/angular-cli/node_modules/resolve/lib/async.js:187:31)在/usr/lib/node_modules/angular-cli/node_modules/resolve/lib/async.js:153:39 Ubuntu 14.04 64位 节点6.6.0 npm 3.9.5 angular-cli@1.0.0-beta.14 我在安装angular-cli时怀疑有些问题,但我不确定。 任何帮助将是有益的。

如何为ubuntu中运行的rocketchat(meteor)应用程序设置文件path或符号链接path

我是node.jsmeteor的新手。 我正在分析一个使用meteorbuild立的应用程序(火箭聊天)。 我正在尝试与本地主机build立火箭聊天应用程序演示。 所以我只是从“ https://github.com/RocketChat/Rocket.Chat ”下载应用程序的源代码,并运行meteor。 它显示错误“疏散分配失败 – 进程内存不足”和“生成器无法写入没有数据或文件path或符号链接path”。 我已经为这个问题寻找解决scheme,我得到了一些参考,因为我需要为应用程序设置一些“环境variables”。 但不清楚需要在环境variables中设置什么值。在此我附上了错误截图,我收到了。 http://postimg.org/image/4dda23c59/ 如何设置环境variables,如何解决这些问题? 任何人都可以帮助我! 提前致谢!。

在Ubuntu 14.04上的MEAN堆栈突然停止工作

好吧,这太臭了,这里是独家新闻: 我正在帮助一个朋友在使用MEAN堆栈(mongodb,express,angular和nodejs)的网站项目上工作,我正在运行Ubuntu 14.04。 我对Linux非常了解,而且我是一名经验丰富的Web开发人员,但我的大部分经验都是使用LAMP堆栈。 直到今天晚上,我一直在做这个MEAN栈项目。 我的朋友跳回到今天晚上的发展,我帮助他们刷新他们在Mac上的节点env(他们大多做前端的HTML / CSS,我做全堆栈)通过运行npm更新和项目工作正常。 指出我可以轻松地刷新我的节点环境,以更加当前我试过同样的事情: 我试图更新我的节点和NPM环境,因为它已经过了几个月(我知道它的坏,我搞砸了,我承认它),我想我正在使用Node.js v 0.3.2.something ,没有想到在这个混乱发生之前检查版本号。 但现在我得到了疯狂的随机错误集,未满足的依赖关系,我无法通过使用npm安装来获取它们来解决未满足的依赖关系,我不能得到grunt来启动开发服务器,我试过删除节点和npm并重新安装(现在运行nodejs 0.10.25)已经运行apt-get update,apt-get install nodejs,apt-get install nodejs-dev,npm update,npm install等,但都无济于事。 我无法坚持和超越沮丧,请帮助! 下面是我得到的一些错误/缺失依赖的示例: module.js:340 throw err; ^ Error: Cannot find module './helpers' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load […]

NodeJS 0.10.25(Ubuntu 14.04)和NodeJS 4.1(从NodeJS.org源码编译)之间的差异

我现在很困惑这些版本号。 我正在计划一个新的项目,我想知道这两个版本之间有什么不同。 这两个版本似乎是一个很大的跳跃,但现在我无法find一个区别。 使用4.1版安全吗? 感谢您的任何帮助!

在安装/升级nodejs v0.10.30时出现“update-alternatives”错误

所以我在进行apt-get升级时遇到这个错误 Setting up nodejs (0.10.30-1chl1~trusty1) … update-alternatives: error: alternative link /usr/bin/node is already managed by nodejs dpkg: error processing package nodejs (–configure): subprocess installed post-installation script returned error exit status 2 Errors were encountered while processing: nodejs E: Sub-process /usr/bin/dpkg returned an error code (1) NB:“nodejs –version”的作品,我得到一个干净的“v0.10.30”,但“节点 – 版本”没有,因为没有链接。 到目前为止,我已经尝试过: 完全删除nodejs和新的安装 在删除nodejs之后,我手动删除了链接/ usr / bin […]

在DigitalOcean Ubuntu 14.04中,Webshot在meteor上失败

我正在使用这个代码来生成pdf: let fileUri = process.env.PWD + '/storage/orders-pdf/' + fileName; // Commence Webshot webshot(html_string, fileUri, options, function(error) { fs.readFile(fileUri, function (err, data) { if (err) { return console.log(err); } fs.unlinkSync(fileUri); fut.return(data); }); }); let pdfData = fut.wait(); 但它会引发以下错误: { [Error: ENOENT, open '/opt/holi/storage/orders-pdf/Attributes.pdf'] errno: 34, code: 'ENOENT', path: '/opt/holi/storage/orders-pdf/Attributes.pdf' } 试图使用NPM包https://github.com/brenden/node-webshot然后代码在本地主机完美工作,但在服务器上失败,并引发此错误: 编辑: 即使没有运行webshot: fs.readFile(fileUri, function (err, […]

在ubuntu中用一个命令列出所有全局安装的模块

我正在使用ubuntu 14.04 ,有没有办法打印所有全局模块(使用npm安装)到命令行。 我怎样才能做到这一点?

nodejs应用程序 – mongodb连接失败,错误“ECONNREFUSED”

背景信息 我正在玩我试图连接到远程MongoDB的第一个nodejstesting应用程序。 问题: 连接失败,出现以下消息: admin@testdev:~/Documents/nodejs_tests$ sudo nodejs index.js Server has started. Request for / received About to route a request for: / inside db connect method Request for /favicon.ico received About to route a request for: /favicon.ico inside db connect method MongoError: connect ECONNREFUSED null MongoError: connect ECONNREFUSED null 这是连接的逻辑: function connect_nimble() { console.log("inside db […]

完全卸载ubuntu 14.04中的nodejs,npm和node

我知道这个问题已经被问了很多次,但我还是不能这样做。 所以我错误地安装“节点”做sudo apt-get install node后来我安装了nodejs(v0.10.37)。 我试图用npm更新到v0.12,但是在执行nodejs -v时,它一直说0.10.37。 此外,我不能使用节点命令,因为我错误地安装了其他“节点的事情”之前。 我尝试了人们在其他所有答案中谈到的所有不同的命令,但是我现在还做不到。 我认为主要的问题是我继续有错误的节点包,安装nodejs-legacy不起作用。 此外, npm install命令的工作原理,并与文件创build文件夹,但我的应用程序仍然说,库缺失。