dolanmiu / docx

Easily generate and modify .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.

Home Page:https://docx.js.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What I am doing wrong ?

akshayOren opened this issue · comments

Discussed in #2584

Originally posted by akshayOren February 9, 2024
Doing this

const doc = new docx.Document();

gives this error.

C:\Users\Akshay\Desktop\pdf\pupppdf\node_modules\docx\build\index.cjs:15434
      creator: (_a = options2.creator) != null ? _a : "Un-named",
                              ^

TypeError: Cannot read properties of undefined (reading 'creator')
    at new File (C:\Users\Akshay\Desktop\pdf\pupppdf\node_modules\docx\build\index.cjs:15434:31)
    at Object.<anonymous> (C:\Users\Akshay\Desktop\pdf\pupppdf\index2.js:16:13)
    at Module._compile (node:internal/modules/cjs/loader:1356:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
    at Module.load (node:internal/modules/cjs/loader:1197:32)
    at Module._load (node:internal/modules/cjs/loader:1013:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
    at node:internal/main/run_main_module:28:49
``` </div>