Exception: Call to Node module failed with error: Error: Uncaught (in promise): Error: DI Error Error: DI Error

image

I received the above error.  Turns out I didn’t add the service to the providers.  Not a very helpful error message though so I figured I would blog it.

Before Fix

@Component({     selector: 'home',     templateUrl: './home.component.html'
})

After Fix

@Component({     selector: 'home',     templateUrl: './home.component.html',

providers: [ MyService ] })

At some point during this I had gotten ‘no provider for’ which lead me to here: http://stackoverflow.com/questions/30580083/angular2-no-provider-for-nameservice

Advertisements

Be Careful Copying From Windows Calculator–Hidden Characters are Pre-Pended and Appended

I was using the Windows Calculator app to convert bytes to mebibytes and when I copied the value from the app to my nlog.config file, nlog blew up on me.  I didn’t make the connection right way so it took me ~30mins of debugging to see what was going on.

image

The first value I copied and pasted.  The 2nd value I manually typed in.

image

Using the built-in ASCII –> HEX we can see they are different!

image

 

Background

Diff Merge

image

NLog Exception

2017-03-17 12:18:07.7561 Error Parsing configuration from C:\Users\mdepouw\Source\Repos\Some App\Some App\DealBank.Web\nlog.config failed. Exception: NLog.NLogConfigurationException: Exception when parsing C:\Users\mdepouw\Source\Repos\Some App\Some App\DealBank.Web\nlog.config.  —> NLog.NLogConfigurationException: Error when setting property ‘ArchiveAboveSize’ on File Target[allfile] —> System.FormatException: Input string was not in a correct format.
   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)

Visual Studio 2017–The Repository was cloned successfully but VS says not cloned?!

After I cloned the repo, which said was successful, it still had the icon about it not being cloned and wouldn’t see any changes I made.

Fix – DeveloperCommunity.VisualStudio.com

Copy libeay32.dll and ssleay32.dll from: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin to C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\libexec\git-core

VS 2017 Clone Issue