Tag: visual studio 2013

MongoDB和Express:types错误:将循环结构转换为JSON

我是新的MEAN堆栈。 我正在尝试从MongoDB中检索文档列表。 我已经使用Visual Studio 2013社区版来创build基本的Nodejs Express应用程序。 Visual Studio在根上创buildapp.js文件进行configuration。 我已经把下面的代码放在app.js中,这与mongodb有关: var mongo = require('myDB'); var db = new mongo.Db("myDB", new mongo.Server("localhost", "27017"), { safe: true }, { auto_reconnect: true }); // Make our db accessible to our router app.use(function (req, res, next) { req.db = db; next(); }); 在visual studio创build的path文件夹中,我创build了一个将执行CRUD操作的js文件。 我在这个文件中有以下代码: var express = require('express'); var […]

Visual Studio不能将JavaScript输出组合成一个文件。 我需要做更多的调整吗?

我之前设置的设置如上图所示。 我不知道我该怎么做才能完成将所有.ts文件合并成一个.js文件。

Windows 10 node-gyp无法构build:MSBUILD失败,退出代码1

Windows 10,Microsoft Visual Studio 2013,Node v0.12.7,node-gyp v2.0.2 我总是得到node-gyp的错误生成错误: Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` failed with exit code: 1 另外在红色的颜色描述: Could not write lines to file "Release\obj\validation\validation.tlog\validation.lastbuildstate". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 […]

Visual Studio 2013量angular器智能感知

首先,我非常习惯使用node.js / angualar.js /protractor.js和jasmine.js的东西,而我根本不是来自web dev的angular落。 但现在,我只是想创build一个angular度的应用程序量angular器testing,这实际上工作相当好。 但我想知道是否有可能获得VS2013 intellisense的工作? 我会很感激,如果VS会build议像“browser.xxx”的对象的function。 我真的坚持,期待一些提示! thx弗洛里安

实习生与Visual Studio 2013集成

环境 我们目前在Visual Studio 2013 Update 4中使用了2个Chutzpah包( 这个和这个 ),使我们能够针对我们正在开发的angular度应用程序执行单独的Jasmineunit testing(Chutzpah上下文菜单“在浏览器中打开”)。 我们目前必须使用Chrome开发人员工具来设置断点并debuggingunit testing。 目前的Jenkins构build运行Moqunit testing对C#应用程序代码和SauceLabs跨浏览器seleniumtesting。 JStesting的下一步是将它们作为Jenkins构build的一部分与其他testing一起执行。 为了实现这个目前最好的工具是实习生 。 我们的要求 执行JStesting并将计算覆盖范围作为Jenkins在SauceLab上构build的一部分。 执行并逐步(debugging)JSunit testing 关于1,我可以从Intern的例子中看到,我们可能必须(可以)重写我们的Interntesting,让它们在Jenkins和SauceLabs上执行。 关于2,这篇文章的重点: 我的问题 可以使用开发人员工具在Chrome中debugging以Intern示例的方式编写的testing吗? 是否需要类似Chutzpah的工具来将Visual Studio与Intern集成? ( 这是类似的工具吗?)

为什么在Visual Studio for Azure中的node.js服务器的创build方式不同?

我在Azure项目中遇到了一个奇怪的问题,这似乎与服务器的创build方式有关。 该项目是使用Visual Studio 2013 Ultimate中的Basic Azure Node.js Express 4 Application模板创build的。 经过一番斗争,该项目在本地运行良好,直到我点击浏览器的刷新button,永远不会回来。 该项目最初是在WebStorm创build的,我没有这个问题。 据我所知,他们之间的差异是非常小的:在WebStorm,这是用来: var server = http.createServer(app); server.listen(process.env.PORT, process.env.IP); 但在Visual Studio中,这是使用(从www文件中的模板创build的): app.set('port', process.env.PORT || 3000); var server = app.listen(app.get('port'), function() { console.log('express server listening on port ' + server.address().port); }); 当我用WebStorm版本replace这个,一切似乎再次正常工作。 有人可以解释为什么吗? 顺便说一下,在我的应用程序中,我不使用节点视图。 相反,我正在使用: app.set("view options", { layout: false }); app.all('*', function (req, res, next) […]

winsock2.h,安装节点包时不需要这样的文件或目录

在安装节点模块时,我得到winsock2.h, no such file or directory错误。 请参阅下面的文本以获取更多信息。 Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets(355,5): warning MSB8003: Could not find WindowsS an invalid version number. [c:\Playground\ng-tpl\node_modules\mongoose\node_modules\mongodb\node_modules\mongodb-core\node_modules kerberos.cc c:\users\Jay\.node-gyp\0.10.26\deps\uv\include\uv-private/uv-win.h(32): fatal error C1083: Cannot open include file: 'winsock es\mongoose\node_modules\mongodb\node_modules\mongodb-core\node_modules\kerberos\build\kerberos.vcxproj] worker.cc security_credentials.cc security_buffer.cc security_buffer_descriptor.cc […]

npm安装浏览器同步错误

首先,错误: Error: Can't find "msbuild.exe". 环境: node -v v0.12.7 node-gyp -v v2.0.1 npm -v 2.11.3 我已经通过指定–msvs_version = 2013过去了这个…它现在不工作。 我最近尝试了这些其他的解决scheme无济于事。 node-gyp configure –msvs_version=2013 node-gyp build #and this npm config set msvs_version 2013 –global

visual studio 2015 – 同时debuggingnode.js和浏览器

我已经在Visual Studio 2015中创build了一个node.js项目,它在启动时启动了Web浏览器(Microsoft Edge)。 就目前来说,我只能debugging我的node.js代码。 有什么办法可以同时debugging我的整个应用程序端到端? 也就是说,为了能够在我的服务器端node.js代码和我的客户端的js代码中放置断点。 我知道有可能在Web风暴(与铬)…所以我不知道我是否可以在Visual Studio中有相同的经验。 谢谢!

使用Visual Studio 2013debugging摩卡testing

我发现的大多数指南都有旧的和不可达的链接和例子。 我有一些摩卡testing,并试图用Visual Studio 2013进行debugging。目前我刚刚使用命令从命令行运行它们: mocha tests –require tests/helpers/chai.js –reporter spec 我见过的地方可以添加–debug-brk ,然后附加到进程。 我得到Debugger listening on port 5858但我没有看到附加窗口中的端口5858进程。 我错过了一些步骤? 我可以在NodeJS项目上debugging正常的nodejs代码(我有安装visual studio的nodejs工具) 谢谢