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

Getting the "Token not found" error on document patch #2989

Open
bryandidur opened this issue Mar 12, 2025 · 0 comments
Open

Getting the "Token not found" error on document patch #2989

bryandidur opened this issue Mar 12, 2025 · 0 comments

Comments

@bryandidur
Copy link

I'm getting the error when I try to replace tokens using Patcher.

The last two tokens marked in the document are causing the problem. If I remove them, the process finishes successfully. I've been trying for hours to understand what's wrong with the last tokens in the document and I haven't come to any conclusion. Even copying and pasting the tokens that work, without any changes, Patcher can't perform the replacements and I get the error "Token not found".

I created a fork of the project, added a new demo called "96-template-token-not-found-error.ts" with the error example, for reproduction.

Here's the link to the fork and the demo file: https://github.com/bryandidur/docx/blob/master/demo/96-template-token-not-found-error.ts

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

1 participant