-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
###Does jspdf even work server side ?
node -v
v11.5.0
"jspdf": "^1.5.3",
/home/unknown/.nvm/versions/node/v11.5.0/lib/node_modules/ts-node/src/index.ts:261
return new TSError(diagnosticText, diagnosticCodes)
^
TSError: ⨯ Unable to compile TypeScript:
test-jspdf.ts(18,8): error TS2339: Property 'window' does not exist on type 'Global'.
test-jspdf.ts(19,8): error TS2339: Property 'navigator' does not exist on type 'Global'.
test-jspdf.ts(20,8): error TS2339: Property 'btoa' does not exist on type 'Global'.
at createTSError (/home/unknown/.nvm/versions/node/v11.5.0/lib/node_modules/ts-node/src/index.ts:261:12)
at getOutput (/home/unknown/.nvm/versions/node/v11.5.0/lib/node_modules/ts-node/src/index.ts:367:40)
at Object.compile (/home/unknown/.nvm/versions/node/v11.5.0/lib/node_modules/ts-node/src/index.ts:558:11)
at Module.m._compile (/home/unknown/.nvm/versions/node/v11.5.0/lib/node_modules/ts-node/src/index.ts:439:43)
at Module._extensions..js (internal/modules/cjs/loader.js:732:10)
at Object.require.extensions.(anonymous function) [as .ts] (/home/unknown/.nvm/versions/node/v11.5.0/lib/node_modules/ts-node/src/index.ts:442:12)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:774:12)
Even if it is run directly in JS, we have following issue
ReferenceError: html2pdf is not defined
at /home/unknown/Projects/project-api/node_modules/jspdf/dist/jspdf.min.js:202:16291
at /home/unknown/Projects/project-api/node_modules/jspdf/dist/jspdf.min.js:1:124
at Object.<anonymous> (/home/unknown/Projects/project-api/node_modules/jspdf/dist/jspdf.min.js:1:128)
at Module._compile (internal/modules/cjs/loader.js:721:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
Metadata
Metadata
Assignees
Labels
No labels