calvinfroedge / node-jspdf

jsPDF on the server.
14 stars 19 forks source link

Fails with error #3

Open bahmutov opened 8 years ago

bahmutov commented 8 years ago

After doing npm install node-jspdf (npm 3.6.0, node 5) and trying to execute I get an error

$ node -r node-jspdf
module.js:341
    throw err;
    ^

Error: Cannot find module './vendor/jsPDF/jspdf.plugin.addhtml.js'
    at Function.Module._resolveFilename (module.js:339:15)
    at Function.Module._load (module.js:290:25)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at /Users/gleb/git/training/node/pdf/node_modules/node-jspdf/index.js:7:5
rettops commented 8 years ago

Node-jspdf brings in the 'master' version of jspdf. The version of node-jspdf that is currently in the npm repository (0.0.3) is not compatible with the master version of jspdf.

If you do a 'npm install https://github.com/calvinfroedge/node-jspdf.git', that will get you a newer copy of node-jspdf that is compatible with the master version of jspdf.

trevordowdle commented 8 years ago

Had the same issue, but I'm getting the following error when running 'npm install https://github.com/calvinfroedge/node-jspdf.git'

node-jspdf@0.0.3 install C:\Users\tdowdle\Desktop\PDF\node_modules\node-jspdf

sh install.sh install.sh: line 8: syntax error: unexpected end of file

trevordowdle commented 8 years ago

Must be related to trying to run cygwin in windows 10. Some syntax issue that may not exist natively..

dbauszus-glx commented 8 years ago

Works alright with the unix bash shell on Win10 (anniversary edition).

need to have git and unzip installed on the bash shell and then from within the node_modules directory.

git clone https://github.com/calvinfroedge/node-jspdf.git cd node-jspdf ./install.sh

itditp commented 7 years ago

it works, thanks! git clone https://github.com/calvinfroedge/node-jspdf.git cd node-jspdf sudo sh install.sh

the-homeless-god commented 1 year ago

it works, thanks! git clone https://github.com/calvinfroedge/node-jspdf.git cd node-jspdf sudo sh install.sh

I would recommend avoid to use sudo