-
Notifications
You must be signed in to change notification settings - Fork 43
"TypeError: jsnlog_1.JL is not a function" with TypeScript and SystemJS #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Sorry for the late response. I have no experience with SystemJS and have no idea what is going wrong. Should you find out and if it is an issue in jsnlog.js, I would be interested in a pull request. |
To get jsnlog to work seamlessly with systemjs, I had to do the following: update jsnlog to support importing the JL named export from an ES module
configure systemjs to load jsnlog as a commonjs module:
import jsnlog
use jsnlog
References: |
It seems jsnlog.sln requires Visual Studio 2013. When I build jsnlog.sln in Visual Studio 2015, I get different results than what's in git. I did notice files referenced in jsnlog.sln are missing from git: I'm using the master branch. Here is the output when running minify.bat:
Is there a contributing guide? (ex. CONTRIBUTING.md) Thank you. |
Thanks for pointing out how to make jsnlog.js work with SystemJs. I'll update the jsnlog.ts and the web site for the next release. You're right, the .sln file had lots of broken file references. Fixed those now. I use Visual Studio 2017 Community Edition to open that file. You can find the Google Closure Compiler at As you found out, the minify.bat / minify.ps1 files were never meant for use by people other than myself. It is part of the build process to create new releases of JSNLog (JavaScript file, Nuget package, website, etc.) It heavily ties in with the other JSNLog related projects. I've now added some comments to that effect. As far as jsnlog.js is concerned, this simply generates a copyright message with the correct version number, etc. If you want to use your own version of jsnlog.js, you should be fine with just using the TypeScript compiler and a minifier. No, there is no contributing guide. I am more than happy to receive bug reports and pull requests, but never saw the need for a contributing guide. |
FYI this fixes also this one: Angular aot build |
Hi.
Thank you for jsnlog.js.
I'm trying to integrate jsnlog.js using TypeScript and SystemJS, similar to issue #24, but it happens with JSNLog 2.25.1.
I've attached a sample Visual Studio solution here.
Basically, this causes the JavaScript run-time error
TypeError: jsnlog_1.JL is not a function
in chrome:But I'm able to work-around this issue using:
But then I lose typing.
Any thoughts?
Thank you!
The text was updated successfully, but these errors were encountered: