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

Import Error for @n8n/chat #8218

Closed
artushin opened this issue Jan 3, 2024 · 4 comments
Closed

Import Error for @n8n/chat #8218

artushin opened this issue Jan 3, 2024 · 4 comments
Labels
in linear Issue or PR has been created in Linear for internal review

Comments

@artushin
Copy link

artushin commented Jan 3, 2024

Describe the bug
Import of @n8n/chat fails with the following error when using the boilerplate example setup.

src/App.vue:5:28 - error TS7016: Could not find a declaration file for module '@n8n/chat'. '/Users/artushin/src/github.com/n8n-io/n8n/packages/@n8n/chat/dist/chat.es.js' implicitly has an 'any' type.
  There are types at '/Users/artushin/src/github.com/artushin/home/frank-chat/node_modules/@n8n/chat/types/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@n8n/chat' library may need to update its package.json or typings.

To Reproduce
Steps to reproduce the behavior:

  1. Setup a new vite project (use typescript and vue)
  2. Update code as per example instructions
  3. Run npm run build in the example project

Expected behavior
Build succeeds

Environment (please complete the following information):

  • OS: Mac OSX
  • n8n Version @n8n/chat 0.6.0
  • Node.js Version v20.10.0

Additional context
Pretty sure you just don't need the exports section in the dist/package.json.

@Joffcom
Copy link
Member

Joffcom commented Jan 4, 2024

Hey @artushin,

Can you share an example project that reproduces this issue?

@artushin
Copy link
Author

artushin commented Jan 4, 2024

@Joffcom
Copy link
Member

Joffcom commented Jan 5, 2024

Hey @artushin,

Perfect thanks, Not sure what is going on there but I have created a dev ticket so someone can look into it. We are tracking the issue internally as ADO-1650, For now I know that some folk have had sucess directly using the cdn to add the chat widget to their sites so that could be an option for you.

@Joffcom Joffcom added the in linear Issue or PR has been created in Linear for internal review label Jan 5, 2024
@artushin
Copy link
Author

artushin commented Jan 5, 2024

@Joffcom , np, thanks for looking, I'm just building from source for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in linear Issue or PR has been created in Linear for internal review
Projects
None yet
Development

No branches or pull requests

2 participants