Skip to content
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

TypeError: self.getLineBreakChar is not a function #140

Open
Harisene opened this issue Nov 29, 2023 · 1 comment
Open

TypeError: self.getLineBreakChar is not a function #140

Harisene opened this issue Nov 29, 2023 · 1 comment

Comments

@Harisene
Copy link

Hi all,

I'm getting this error now in my AWS lambda function. I recently updated the runtime node version of the Lambda function to 16.

ERROR TypeError: self.getLineBreakChar is not a function

I check the ical folder and getLineBreakChar function does exist in ical.js file.

Does anybody have any idea for a solution? Cheers!

@RickyCook
Copy link

This seems to be related to the fact that this is directly in parseICS, which isn't bound to any object. This occurred for me when I was importing the function like this:

import { parseICS } from 'ical';
...
parseICS(...);

The solution for me was:

import * as ical from 'ical';
...
ical.parseICS(...);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants