Comments (7)
I just tried this using NextJS, and it works fine for me on 8.3.0
Re-open if there are any more issues
from docx.
Yes, After Nextjs 14.0.1+ it's working. I think the issue was with Nextjs webpack instead of the library.
from docx.
Is this in a regular browser environment? Or React? etc
from docx.
React, specifically NextJs
from docx.
I was getting errors on all imports after that.
Following #2365, CJS import works. ESM has issues.
from docx.
I still encounter this issue. Have tried both CJS and ESM. Using latest docx (8.5.0), next 14.1, react 18.2, and javascript.
When creating a new document (const doc = new Document()), I receive the following error:
TypeError: Cannot read properties of undefined (reading 'creator') at new File (index.cjs:15435:31)
from docx.
This is a separate issue, this is because you need to add at least an empty { sections: [] }
object in Document
for it to be valid
from docx.
Related Issues (20)
- can not set indent by chars HOT 2
- Adding different numbering within the same line of paragraph HOT 12
- Field Codes in SimpleField Formulas HOT 1
- Corrupt Word document from patching with an XML attribute with an ampersand HOT 3
- After Patching, Following Text is Wrong Font Family HOT 1
- Possibility of adding hanging without affecting left indent of the paragraph.
- `PageNumber.TOTAL_PAGES_IN_SECTION` not documented and not functional, but within TS enum HOT 2
- Colors are not showing properly HOT 2
- When I open a document using WPS office, the width of the table cannot fill the entire page HOT 3
- Add accent characters
- The MathIntergral limLoc seems to be wrong
- Doesn't work with bg-black HOT 1
- Couple issues with embedded fonts HOT 3
- how to set field language 'TH' in TextRun HOT 1
- Error "Can't read the data of 'the loaded zip file'" from docx patcher HOT 7
- ImageRun not working with data of ArrayBuffer type HOT 6
- Can not find `patchDocument` in browser
- iterate paragraphs HOT 1
- Can I set the font in mathematical formulas to be non-italic?
- Generate Table Of Contents (TOC) programmatically HOT 1
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 docx.