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.
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?
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\"
Have you tried making the "node_modules" folder hidden?
I had a similar issue where visual studio was crashing. It came down the paths of some files in the node_modules folder being greater than 260 characters
I'm not saying this will work for you, as I haven't had your exact issue, but as Visual Studio doesn't load hidden folders... it just might work :-)
来源:https://stackoverflow.com/questions/22024861/azure-emulator-not-starting-for-web-role-if-node-modules-directory-exists