Tag: git bash

Crtl + C没有查杀服务器

我正在运行Windows 10,当我尝试杀死使用Crtl + C的进程它不起作用,我必须运行: netstat -ano | findstr :yourPortNumber taskkill //PID typeyourPIDhere //F 这停止了​​进程,当我运行nodemon服务器重新启动罚款,但如果我有mongod运行,那么nodemon引发已经在使用中的端口,它崩溃。 编辑1:我现在能够通过我的git bash( nodemon app.js )上的nodemon命令启动我的服务器来使用nodemon。 这已经解决了我的大部分问题,但是我仍然无法通过ctrl + c快捷方式closures我的服务器,每次我要closures它或者我对主文件进行更改时,都必须手动closures服务器任务。

Git bash在错误的地方寻找node / npm模块

当我运行从git bash全局安装的任何节点模块时,它会抛出一个错误,它找不到(只是!)已安装的模块,在这个例子中,我试图用sails.js创build一个新项目: sails(master) > sails new test-project module.js:538 throw err; ^ Error: Cannot find module 'C:\Program Files\Git\node_modules\sails\bin\sails.js' at Function.Module._resolveFilename (module.js:536:15) at Function.Module._load (module.js:466:25) at Function.Module.runMain (module.js:676:10) at startup (bootstrap_node.js:187:16) at bootstrap_node.js:608:3 sails(master) > 那么,它当然找不到它,因为所有这些软件包都安装在Appdata / Roaming / npm / node_modules中,并且愉快地驻留在那里他们应该在哪里。 那么我怎么能指出git bash来查找正确的地方呢? 什么应该是这个确切的地方? 它发生在每一个新的包裹是帆,或expression..我自己弄不明白,浪费了很多时间search它。 我知道这个问题对于有经验的用户来说似乎是荒谬的,但是我在节点环境中相当新手。 在我的env.variables中,我有:用户variables:blabla \ Appdata \ Roaming \ npm系统variables:..C:\ Users \ Tomy […]

没有find牛逼的命令

我是node.js的新手,并试图遵循本教程 。 我得到最后一个命令beefy game.js:bundle.js –live的错误beefy game.js:bundle.js –live 。 它说sh.exe": beefy: command not found 我使用的健壮的包版本是2.1.1 试图谷歌这个问题,但找不到解决scheme。

Git Bash和webpack

你好,我正在试图学习Webpack我一直在一些教程,我遇到了一些问题。 我在本地安装了webpack文件夹,我正在使用npm install webpack –save-dev 。 我做了两个JS脚本,我想捆绑他们,我已经尝试在WindowsPowerShell(我正在使用Windows 7)下面的命令webpack script-1.js /.bundle.js 。 现在这造成了以下错误 webpack不被识别为内部或外部命令可操作的程序或batch file 所以我安装了全球的webpack,当我在PowerShell中使用相同的命令(我已经打开它作为pipe理员),它使bundle.js文件,但不是在我工作的目录,但在C: 现在这个失败后,我决定尝试使用git bash。 首先我试过这个命令的webpack script-1.js /.bundle.js并得到以下错误 bash:webpack:找不到命令 最后经过一番尝试后,我能够使用git bash中的这个命令工作node_modules/.bin/webpack ./script-1.js bundle.js 有没有办法解决这个问题,所以我可以只键入webpack而不是整个path? 还有一种方法可以修复PowerShell中的path? 这是我的package.json { "name": "webpack-playlist", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", "url": "git+https://github.com/iamshaunjp/webpack-playlist.git" […]

在git bash中创build一个框

我正在使用节点(个人项目)在git bash中为基于文本的游戏进行布局。 我无法find任何与绘制具体块(例如:大矩形)有关的东西来保存我的内容。我唯一能想到的是console.log(),但是我肯定要有更好的那里有select。 有没有人有任何想法?

Bash + Node.js + stdin / stdoutredirect:错误“不是tty”

此问题可能是Windows特定的。 我没有在Linux或Mac上testing过。 我用: Windows 7 64位 Node.js 8.1.3 Git for Windows 2.8.1,包括GNU bash,版本4.3.42(5) – 发布 node my-cli.js > foo.txt :错误output is not a tty node my-cli.js < foo.txt :错误input is not a tty 。

Angularjs,我无法获得node.js服务器文件运行

我得到一个错误窗口: Windows脚本主机 脚本:… angular \ scripts \ web-server.js 行:1 Char:1 错误:无效的字符 代码:800A03F6 来源:Microsoft JScript编译错误 有任何想法吗? 这是我第一次真正进入Git和Node.js和angular度,所以请提前原谅我愚蠢的问题:-D 抱歉缺less信息,我已经得到了安装node.js,我试图启动web-server.js,这应该使这个页面显示在http://localhost:8000/app/index.html

npm查看获得更多的项目

我正在使用以下命令来查找我有的包的版本。 npm view <packagename> versions 我回来的结果如下 '2.4.0-2016-10-06-6743', '2.4.0-2016-10-07-6750', '2.4.0-2016-10-07-6751', '2.4.0-2016-10-07-6754', '2.4.0-2016-10-07-6755', '2.4.0-2016-10-10-6763', '2.4.0-2016-10-11-6770', '2.4.0-2016-10-11-6790', '2.4.0-2016-10-12-6799', '2.4.0-2016-10-12-6800', '2.4.0-2016-10-13-6806', '2.4.0-2016-10-13-6807', '2.4.0-2016-10-13-6808', '2.4.0-2016-10-14-6810', … 37 more items ] 我想得到所有的结果,你可以看到有37 more items没有显示。 我怎样才能得到所有的结果。 我正在使用Windows命令提示符以及在Windows上的gitbash工具。

护照本地策略和cURL

我想用CURLtesting我的node.js + express + passport.jstesting应用程序(RESTful)。 我的代码: var express = require('express'); var routes = require('./routes'); var http = require('http'); var path = require('path'); var passport = require('passport'); var LocalStrategy = require('passport-local').Strategy; // Define the strategy to be used by PassportJS passport.use(new LocalStrategy( function(username, password, done) { if (username === "admin" && password === "admin") // stupid […]

如何安装npm不能在git bash上运行

我打开git bash,然后inputnpm install ,然后返回: bash: npm command not found 我不明白,因为我有node.js命令提示符,当我键入npm -v然后返回3.7.3 。 如何在git中不起作用?