-
Notifications
You must be signed in to change notification settings - Fork 12k
How to import a typescript module #327
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
Hi, copy-paste that module to |
Hi @guillaumeleone, MD5 seems to have been compiled with CommonJS. You can specify SystemJS configuration to use it with something like this: System.config({
meta: {
'assets/js/md5.js': {
format: 'commonjs'
}
}
}); |
Closing this. Reopen if the above doesn't solve it. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Hi team,
I'm trying to import a md5 ts module in my angular 2 project, which is https://www.npmjs.com/package/ts-md5
I've followed these instructions #274
1 -
npm install ts-md5 --save
2 - I've copied/pasted
md5.js
into the folderassets/js
3 - As returned in the README file of the module site, I imported the module in my component file like this:
When I ran my project, I got this error:
GET http://localhost:4200/ts-md5/dist/md5 404 (Not Found)
So, I added to my System config this line:
OK, now, It works.
But, I still have one error (non-blocking)
Corresponding to this line code:
Is there a better way to include the md5 ts module ?
How to remove this error ?
The text was updated successfully, but these errors were encountered: