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

Slack - Update Status erroring with message moment_1.default.tz is not a function #8336

Closed
rorpage opened this issue Jan 15, 2024 · 9 comments

Comments

@rorpage
Copy link

rorpage commented Jan 15, 2024

Describe the bug
When executing the Slack node to Update Status, there is an error that says: ERROR: moment_1.default.tz is not a function. I believe this is similar to #8184.

To Reproduce
Try to update Slack Status:

  1. Include the Slack node in a workflow
  2. Set the operation to "Update User's Profile"
  3. Specify an expiration time or not, both cause the issue.
  4. When executing, view the error: TypeError: moment_1.default.tz is not a function

Expected behavior
This was working before an update to Moment and would set Slack statues appropriately.

Environment (please complete the following information):
- OS: Linux (Docker Container from Docker hub)
- n8n Version: 1.22.6 (and previous ones down to .3)
- Node.js Version: v18.18.2 (Docker Container from Docker hub)
- Database system: SQLite
- Operation mode: left untouched

Additional context
None, thanks!

@Joffcom
Copy link
Member

Joffcom commented Jan 15, 2024

Hey @rorpage,

I have just given this a go in 1.24.0 and I was not able to reproduce it, Can you try updating and let me know if the newer version is working for you.

@rorpage
Copy link
Author

rorpage commented Jan 15, 2024

@Joffcom Absolutely, trying it now! I will report back shortly.

I didn't see a PR that resembled #8185 for the Slack node so I thought I'd give a fix a try, but if it's working in a newer version, then that's awesome!

@netroy
Copy link
Member

netroy commented Jan 15, 2024

I believe this is very edge-case issue where the Slack node is getting loaded into memory before any other part of the code has had the opportunity to load moment-timezone.

#8185 Fixed this for the Schedule node. But, looks like we need to completely remove import moment from 'moment' to make sure this edge-case never happens. #8337 will do that.

@rorpage
Copy link
Author

rorpage commented Jan 15, 2024

@netroy You're too fast! :D Thanks for doing that!

@Joffcom I was able to reproduce it in 1.24.0 just now.

@rorpage
Copy link
Author

rorpage commented Jan 15, 2024

I'm on Windows and did one have documentation update here to include @latest as I was getting a corepack error:

Usage Error: Invalid package manager specification in CLI arguments; expected a semver version, range, or tag

Shall I open a separate issue for that?

@netroy
Copy link
Member

netroy commented Jan 15, 2024

I'm on Windows and did one have documentation update

Did you by any change run the corepack command in the packages/cli folder instead of the repo root folder ?

@rorpage
Copy link
Author

rorpage commented Jan 15, 2024

I did not. I was in the root folder. Should I have? Did I miss a step?

@rorpage
Copy link
Author

rorpage commented Jan 16, 2024

Confirmed to work with 1.24.1. Thank you all!

@Joffcom
Copy link
Member

Joffcom commented Jan 16, 2024

Hey @rorpage,

That is good to hear, I will get this marked as closed.

@Joffcom Joffcom closed this as completed Jan 16, 2024
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

3 participants