草庐IT

tm_start

全部标签

node.js - Node 。并且 npm start 不起作用

标题说明了大部分问题。当我尝试运行node.我得到:module.js:340throwerr;^Error:Cannotfindmodule'static-favicon'atFunction.Module._resolveFilename(module.js:338:15)atFunction.Module._load(module.js:280:25)atFunction.Module.runMain(module.js:497:10)atstartup(node.js:119:16)atnode.js:902:3实际上似乎没有模块文件夹。我只是在一个空目录中运行expressn

node.js - Gradle "... occurred starting process ' 命令 'npm' '"在 Mac 上

我安装了带有IntelliJIdea的MacOS。我正在使用Gradle(gradle-2.4)来构建项目。我在Mac上安装了NodeJS和NPM,并且可以从shell中使用。MacBook:~user$node-vv4.2.2MacBook:~user$npm-v2.14.7运行使用NODE/NPM的Gradle任务时,它会失败并出现以下错误(在当前示例中为NPM)。*Whatwentwrong:Executionfailedfortask':module:task'.>Aproblemoccurredstartingprocess'command'npm''来自Gradle的错误堆

node.js - npm "scripts": "start" run express and open url

我在package.json中有这个启动参数"scripts":{"start":"nodebin/www"},当我输入npmstart时,它正在运行我的express应用程序。但我希望浏览器同时打开http://localhost:8081。我怎么能对start说也打开我的本地url?like:"start":"nodebin/www,http://localhost:8081"所以当我输入npmsatrt时,它会运行我的快速应用程序并同时打开网址。 最佳答案 据我所知,这就像写一个bash命令://Windows"start":

Node.js + Express : app won't start listening on port 80

我创建并启动这样的应用程序:express-s-tejsnpminstallexpressnpminstallejsnodeapp.js它可以工作(在端口3000上)。但是当我将端口更改为80时,运行nodeapp.js会输出:node.js:198throwe;//process.nextTickerror,or'error'eventonfirsttick^TypeError:Cannotcallmethod'getsockname'ofnullatHTTPServer.address(net.js:746:23)atObject.(/var/www/thorous/app.js:

javascript - npm start 与 Node app.js

我对Node非常陌生,并试图了解应用程序的基础知识。我很好奇为什么这两个命令:nodeapp.js--vs--npmstart向控制台输出同样的东西,似乎继续“收听”,但是为什么当我尝试访问http://localhost:3000时我只在运行第一个命令时得到404。我看到Express4似乎具有不同的应用程序结构,但为什么一个成功监听而另一个没有,尽管控制台中的行为相同?任何解释都是有帮助的。谢谢! 最佳答案 这两个命令不一定相同。npmstart运行任何'start'脚本配置所说的运行,如你的'package.json'中定义的

Node.js https pem 错误 : routines:PEM_read_bio:no start line

我现在正在使用node.js处理登录表单,我尝试使用创建pemkey和csropensslreq-newkeyrsa:2048-new-nodes-keyoutkey.pem-outcsr.pem但是我在运行nodeserver.js时遇到错误这是我的server.jsvarhttp=require('http'),express=require('express'),UserServer=require('./lib/user-server');varhttps=require('https');varfs=require('fs');varoptions={key:fs.readF

linux - Mongo 守护进程不由 service mongod start 运行

最近我通过阅读此页面(http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/)安装了mongodb包。我使用docker和ubuntu14.04镜像来部署我的服务器。问题首先从运行mongod服务开始:#servicemongodstart我得到了以下信息:Ratherthaninvokinginitscriptsthrough/etc/init.d,usetheservice(8)utility,e.g.servicemongodrestartSincethescriptyouareattemptingto

linux - Mongo 守护进程不由 service mongod start 运行

最近我通过阅读此页面(http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/)安装了mongodb包。我使用docker和ubuntu14.04镜像来部署我的服务器。问题首先从运行mongod服务开始:#servicemongodstart我得到了以下信息:Ratherthaninvokinginitscriptsthrough/etc/init.d,usetheservice(8)utility,e.g.servicemongodrestartSincethescriptyouareattemptingto

node.js - npm start 如何在 8000 端口上运行服务器

我最近使用来自github的angular-seed文件夹进行Angular应用程序开发。在之前的一些angularjs教程中,angular-seed文件夹中有一个脚本文件夹和一个server.js文件,其中包含运行Node服务器的所有配置。那么npm现在是如何开始运行Node服务器的,该Node服务器的所有配置在哪里? 最佳答案 我们有一个react应用程序,我们的开发机器是mac和pc。启动命令不适用于PC,所以我们是这样解决的:"start":"PORT=3001react-scriptsstart","start-pc":

node.js - 如何停止 node.js 表达 'npm start' 的应用程序

您使用expressv4.x构建node.js应用程序,然后通过npmstart启动您的应用程序。我的问题是如何停止应用程序?有npmstop吗?EDIT以在实现npmstop时包含错误/home/nodetest2#npmstop>nodetest2@0.0.1stop/home/nodetest2>pkill-sSIGINTnodetest2pkill:invalidargumentforoption's'--SIGINTnpmERR!nodetest2@0.0.1stop:`pkill-sSIGINTnodetest2`npmERR!Exitstatus2