蔚蓝的模拟器不起始Web角色,如果node_modules目录存在 [英] azure emulator not starting for web role if node_modules directory exists

查看:175
本文介绍了蔚蓝的模拟器不起始Web角色,如果node_modules目录存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想我只是无意中发现了一个非常奇怪的问题。我有一个pretty大解决方案,其中包括3角色1 Azure项目,两个工作,一个Web角色。该网站的作用是根据asp.net的MVC和Web API。与试验吞掉昨日(编译和捆绑少的文件)后,我刚才在蔚蓝色的模拟器将不再启动这个角色注意。模拟器启动对话只是停留在〜80%,并保持永远存在,没有任何错误消息。之后,我删除了node_modules目录,一切好起来的工作。

I think I just stumbled on a really weird problem. I have a pretty big solution including one azure project with 3 roles, two worker and one web role. The web role is based on asp.net mvc and web api. After experimenting with gulp yesterday (for compiling and bundling less files), I noticed just now that the azure emulator won't start this role anymore. The emulator start dialog just stops at ~ 80% and stays there forever, without any error messages. After I removed the node_modules directory, everything worked fine again.

该网站的作用,本身并没有使用任何相关的NodeJS,但一饮而尽似乎需要的node_modules目录那里。这是仿真器的一个奇怪的bug或者是预期的行为,我只是不明白?

The web role itself doesn't use anything nodejs related, but gulp seems to need the node_modules directory there. Is this a weird bug of the emulator or is that expected behaviour I just don't understand?

推荐答案

我暂时通过包括pre-构建和生成后事件解决了这个。

I temporally solved this by including Pre-build and Post-build event.

Pre-Build event: npm install

Post-Build event: rmdir /s /q "$(ProjectDir)node_modules\" 

这篇关于蔚蓝的模拟器不起始Web角色,如果node_modules目录存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆