I am trying to get a node.js (meanjs) site running on Azure. The site work on my local environment with no errors. But after deployment when I go to my site I get a 500 error in my network tab in chrome. There are no obvious errors to me.
I used https://groups.google.com/forum/#!topic/meanjs/LrHmE43RSvA to walk me through how to set it up with the azure cli.
It is also setup to deploy form my github.
In the Azure portal the deployment dose not fail. I have read through the log and tried to find a problem but im hardly know where to start. Reading through it there are some things that look weird to me for instance. (The log is long and past the character limit or I would have posted it all.)
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [D:\home\site\repository\node_modules\bson\build\binding.sln]
and there are lots of
npm WARN unmet dependency
Then they all get processed and the files get copped to the wwwroot and finishes successfully.
Some of the things i have tried are changing the deployment branch, deleting the website and starting over. I have
Let me know if there is any thing else that I can add to this post I really want to get this working.
Thanks for any help.
Edit**
I added bson to the .gitignore and got a new error. I am also getting some new errors below is what has changed.
bson#0.2.18 install D:\home\site\repository\node_modules\bson
(node-gyp rebuild 2> builderror.log) || (exit 0)
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.
[D:\home\site\repository\node_modules\bson\build\binding.sln]
npm WARN prefer global coffee-script#1.8.0 should be installed with -g
npm ERR! Error: ENOENT, chmod >'D:\home\site\repository\node_modules\flatiron\bin\flatiron'
npm ERR! If you need help, you may report this entire log,
I also added a .npmignore to the directory but it is blank. I have tried adding both the bson and flatiron to the .gitignore but that did not change the error.
From the log you posted, I can see it failed when azure tried to install an NPM module named bson during the deployment, because there's no VC++ compiler in the virtual machine your azure website located.
It worked well in your machine since you have VC++ installed.
To fix, you'd better compile this module (bson) in your machine (x86 or x64 based on which one selected in your azure website), make this module as included under node_modules folder in your .gitignore so that it will be uploaded when you commit your code.
I have a blog post mentioned this problem and I was using Node.js SQL Server Driver as an example. It also needs VC++ compile.
http://blog.shaunxu.me/archive/2012/11/16/install-npm-packages-automatically-for-node.js-on-windows-azure-web.aspx
Related
In Visual Studio Installer, I selected the Node.js development option. It runs successfully. But, if I try to run cmd node -v. It tells me node does not exist.
I tried a few other things including uninstalling and reinstalling the Node.js development option in VS Installer. Plus installing the latest version of node from the website.
However, when I try to run the pre-packed Angular solution that comes with VS 2017 I have issues. The solution will not even start.
The best I have been able to do is install Node 6.10.3. Once I do that, the web site comes up. But, I get a JavaScript error in the vendor.js file. I am able to continue but I get this error when I try navigate to another menu item. Plus the Hot Module Replacement does not seem to be working. (It does not automatically recompile my TypeScript file if I made a change).
I think the key is getting the Node.js development option installed correctly since I am able to run the pre-packed Angular solution on another PC and the Hot Module Replacement works fine.
Please let me know if anyone has any ideas on how to resolve.
I had a similar, if not the same, issue. Check the Visual Studio installation directory (2017 Professional in this case) for Node:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\NodeJs
If the executable is there, add the directory to your PATH.
I'm trying to test if cloudscribe is appropriate for a project I am starting and I'm having challenges getting a cloudscribe instance running.
I'm new to .NET Core 2 and not quite sure how to make it work.
I loaded the VSIX template into VisualStudio 2017, started a new project and got the initial configuration dialogs, but when the project is created, it's getting errors:
Severity Code Description Project File Line Suppression State
Error NU1102 Unable to find package cloudscribe.Core.IdentityServerIntegration with version (>= 2.0.0-preview20170927)
- Found 20 version(s) in nuget.org [ Nearest version: 2.0.0-preview20170828 ]
- Found 0 version(s) in Microsoft Visual Studio Offline Packages cloudscribe c:\My Documents\Visual Studio 2017\Projects\cloudscribe\cloudscribe\cloudscribe.csproj 1
I really would like a robust identity & authentication, so I though the IdentityServer 4(fork) option was the way to go.
If I don't select Identity Server (and using NoDB), the project launches, but the login of admin#admin / admin doesn't work...likely because the database isn't populated.
What am I missing?
There was a missing package on nuget that was causing that error. Sorry for the inconvenience. It should be fine now. To make usre you have the latest nuget packages, open a command window in the root of the solution and run the command:
dotnet restore --no-cache
I've seen quite a few of these questions on SO, but none seem to solve or match the problem.
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 6.x. The odd thing is, I don't have Node.js 6.x installed. From the command line, node -v gives me v5.10.1.
I'm the Angular4 Universal Asp.net core visual studio 2017 template straight out of the box.
I've tried
npm rebuild node-sass --force
Reordering node in Web External toolsin Visual Studio
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HL4JSD9SSV8E": An unhandled exception was thrown by the application.
System.Exception: Call to Node module failed with error: Prerendering failed because of error: Error: Module build failed: Error: Missing binding D:\Projects\angular2\node_modules\node-sass\vendor\win32-x64-48\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 6.x
Found bindings for the following environments:
Windows 64-bit with Node.js 5.x
This usually happens because your environment has changed since running npm install.
Run npm rebuild node-sass --force to build the binding for your current environment.
at module.exports (D:\Projects\angular2\node_modules\node-sass\lib\binding.js:15:13)
at Object. (D:\Projects\angular2\node_modules\node-sass\lib\index.js:14:35)
Where have I gone wrong?
On Visual Studio 2017 (15.4.1) you should go to:
Tools > Configure External Tools > Projects and Solutions > Web Package Management > External Web Tools
Then reorder the tools as seen below.
This worked for me.
Deleting node_modules folder and re-installing npm modules using npm install worked for me.
Visual Studio ships it's own version of Node embedded so that's why you see a mismatch.
The TROUBLSHOOTING guide in the repo covers how to work around this https://github.com/sass/node-sass/blob/master/TROUBLESHOOTING.md#using-node-sass-with-visual-studio-2015-task-runner
I'm trying to start a new ASP.Net MVC 5 project using the new Web Development features included in VS 2015. So far I wasn't able to include any bower packages through the IDE. I've made some tweaks regarding npm, git and bower to include the proxy configuration.
The strange thing is that using node console to run bower works well
However when you try the equivalent with the VS external tool
"C:\Program Files\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\bower.cmd" install angular
it fails
This is running behind a corporate NTLM authenticated proxy, which is bypassed with CNTLM. But I don't think has much to do as the Node version of bower works perfectly fine. You can see the configuration
.npmrc
registry=http://registry.npmjs.org/
proxy=http://127.0.0.1:8128
http_proxy=http://127.0.0.1:8128
https_proxy=http://127.0.0.1:8128
.gitconfig
[http]
proxy = http://127.0.0.1:8128
sslVerify = false
[https]
proxy = http://127.0.0.1:8128
[url "http://"]
insteadOf = git://
.bowerrc
{
"directory": "library",
"registry": "http://bower.herokuapp.com",
"proxy":"http://127.0.0.1:8128/",
"https-proxy":"http://127.0.0.1:8128/"
}
Any thoughts?
[Edit]
The problem ended up being something about permissions. When running VS 2015 "as administrator" it worked fine. It seems some of the operations when moving files from the temporary download folder to the project folder was being prevented (user profiles are created on a network share in this environment, that's what I believe is causing such a mess).
Visual Studio uses a sandboxed version of node / NPM by default for Bower rather than the globally installed version. This means any config you made for the global versions won't apply to VS. You can change this so that Visual Studio uses your globally installed version instead which I can see has no problems getting through your firewall.
To do this, go to Tools -> Options and look for this configuration page:
Add an entry for node:
Make sure you drag it higher in the list so that it's before the Web Tools\External entry (that's where VS installs it's sandboxed versions of Node and NPM).
Hope that does the trick.
As mentioned in the post itself, it ended up being a permissions issue, when running VS 2015 as administrator the problem disappeared.
Had the same issue, but instead of installing a separate bower, I changed the .bowerrc file in the project root directory to:
{
"directory": "wwwroot/lib",
"proxy":"http://127.0.0.1:3128/",
"https-proxy":"http://127.0.0.1:3128/"
}
I downloaded a sample Windows Store Apps project from the Dev Center samples site
When I run the project, I receive the following error in the CharmDemoGridApp
The system cannot find the path specified error
there are no more details, I tried to clean and rebuild the project and nothing happens.
what can be the reason of this ?
OK, I found that the reason was a missing referenced dll.
adding it correctly solved the problem