-
-
Notifications
You must be signed in to change notification settings - Fork 199
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
npm package broken #77
Comments
@leider Can you provide code sample please? |
@leider There's no such thing as a TypeScript class - the code is compiled to JavaScript in the My assumption here (without the code sample you are trying to run) is that you are trying to import the module using a Considering the latest version of import { Feed } from 'feed'; If you want to stick with the old approach, you should be able to do the following: const Feed = require('feed').Feed; As I'm not sure if this was the situation you were facing, please confirm if this solves your issue. |
Thanks. This is the situation. I will try as soon as I can and give feedback.
… Am 10.09.2018 um 23:58 schrieb Jean-Philippe Monette ***@***.***>:
@leider There's no such thing as a TypeScript class - the code is compiled to JavaScript in the lib directory by tsc.
My assumption here (without the code sample you are trying to run) is that you are trying to import the module using a require() instead of an import. Considering the latest version is now using named imports, in ES6, you import it as described in the README:
import { Feed } from 'feed';
If you want to stick with the old way of importing modules, you should be able to do the following:
const Feed = require('feed').Feed;
As I'm not sure if this was the situation you were facing, please confirm if this solves your issue.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Checked it. Thanks for the clarification. Problem was me not understanding excatly what was the problem. Documentation fix is appreciated! |
|
Describe the bug
The current npm release exposes a typescript class not a javascript class
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Works as before
Actual behavior
Kills server
Screenshots
If applicable, add screenshots to help explain your problem.
Versions (please complete the following information):
Additional context
None
The text was updated successfully, but these errors were encountered: