Comments (8)
Hello @RichieRock,
Thanks for pointing that out, this is now fixed in version 3.37.4 of docxtemplater !
If you really liked our support, you could record us a video testimonal for our
site.
The video can last between 30 seconds to 90 seconds.
If you are ok with that, simply follow the following link to do the
recording :
https://testimonial.to/docxtemplater
from docxtemplater.
Hi! Thank you for your reply and for the fix!
I installed [email protected]
but I'm facing another issue.
Cannot find module 'docxtemplater/text' from 'my_file.test.ts'
1 | import angularParser from 'docxtemplater/expressions'
> 2 | import TxtTemplater from 'docxtemplater/text'`
at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11)
Any idea why am I getting this error? That's the error when running a test file with jest. But also, when using TXTTemplater from a regular .ts node file (my environment it's Azure Functions), I also get similar error:
Worker was unable to load function GetUserData: 'Cannot find module 'docxtemplater/text'
Worth mentioning that I did not have these issues when using the angularparser import. Something must be different this time. Perhaps something about it being a class instead of a variable?
from docxtemplater.
I think it should be
import TxtTemplater from 'docxtemplater/js/text.js';
from docxtemplater.
Hmm, interesting. It does work with that /js/
import. However it is weird since vscode approved, and in fact suggested this import:
import TxtTemplater from 'docxtemplater/text'
But the node module resolver didn't like that import.
Also, worth mentioning that it works nicely with
import angularParser from 'docxtemplater/expressions'
Which looks cleaner way to import stuff.
Anyway, I guess I'll use the /js/
version instead :)
from docxtemplater.
import TxtTemplater from 'docxtemplater/text'
is now possible since v3.37.5 !
from docxtemplater.
Thanks!
Unfortunately I'm still facing issues with v3.37.5:
Cannot find module './lexer.js' from 'node_modules/docxtemplater/text.js'
Require stack:
node_modules/docxtemplater/text.js
GenerateOfferLetter/OfferLetterGenerator.test.ts
1 | import angularParser from 'docxtemplater/expressions'
> 2 | import TxtTemplater from 'docxtemplater/text'
from docxtemplater.
Hello, this should now be fixed in v3.37.6
from docxtemplater.
Thank you @edi9999 ! Works now :)
from docxtemplater.
Related Issues (20)
- Cannot resolve @Name placeholder HOT 2
- Chart Module: Unexpected Behavior with Null Value in Data HOT 3
- Differentiate between conditions and loops when getting tags HOT 1
- Conditional assignment doesn't work as expected HOT 1
- Page break propogates to all elements inside div HOT 5
- Numbering for conditional text HOT 3
- Question: Importing ExpressionParser in TypeScript. HOT 6
- When I write a tag in complex content, it doesn't work HOT 4
- HTMLModule Dependencies causing errors HOT 1
- paragraphLoop doesn't seem to work HOT 2
- ChartModule + ErrorLocationModule HOT 2
- Bun.sh HOT 1
- Trying to setup angular parser, but is failing with compilation error. HOT 8
- getSize 返回一个promsie ,word预览正常,但是导出word图片丢失 HOT 2
- Compile (tsx) issue with TxtTemplater HOT 1
- Ability to Insert IDs into XML Tags HOT 1
- Slides demo is broken HOT 1
- According to Microsoft Word, the generated file is corrupted. Cannot open it. HOT 12
- Duplicate content of a word file (in one page) HOT 1
- Error: New Delimiters cannot be parsed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docxtemplater.