Contributing to chat widget

Hi there. I’m interested in contributing to chat widget. But now I’m struggling with project building.

I follow the recommendations from here n8n/CONTRIBUTING.md at master · n8n-io/n8n · GitHub but on every machine (Windows and Debian) I’ve got the same result: error - Potential missing package.json files: chat.umd.js, chat.es.js, types/index.d.ts, index.mjs, index.js, style.css

As a result after pnpm run build there is no chat.bundle.es.js ,chat.bundle.umd.js and other working project files in chat widget directory.

Could you help how to build chat widget project properly?

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

@jan Maybe you could suggest something :slight_smile:

Hi @GDRIVE_ADVAGA, thank you for reaching out and being a part of the n8n community! Could you share a link to the chat widget you are referring to?

If you are trying to contribute to a community node and you are seeing those errors, please refer to our troubleshooting guide for community node development in our documentation.

I hope that helps. Happy building!

Hey @GDRIVE_ADVAGA! Super happy to hear you want to contribute to the chat widget.

The error you’re seeing when building is expected. We’re running a postbuild script (see packages/@n8n/chat/scripts/postbuild.js) that essentially restructures the output files into a publishing-ready package in the dist folder.

If you look at the .np-config file, the configuration file for np (the publishing tool that we use), you’ll see that the publishing directory is set to dist.

This allows us to publish the @n8n/chat package without the intermediary dist folder, making importing package files cleaner for the end-user. The script was written before the exports field of package.json was fully supported by all build tools.

Last but not least, looking forward to your future contributions. Thank you!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.