markushedvall / plantuml-encoder

PlantUML encoder, works in browser & node.js
MIT License
106 stars 15 forks source link

Cannot find module '../node_modules/pako/lib/deflate.js' #1

Closed nrekretep closed 8 years ago

nrekretep commented 8 years ago

I am using node-plantuml inside my project and I installed the dependencies with npm@3.3.6. All downloaded packages now reside inside the node_modules directory of my project.

This seems to be a problem for plantuml-encoder because it expects to have its own node_modules folder (which it doesn't have now).

Error: Cannot find module '../node_modules/pako/lib/deflate.js'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:286:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/tmp/pikturr/node_modules/plantuml-encoder/lib/plantuml-encoder.js:3:19)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)

Could you please have a look at this?

Thanks, Peter

markushedvall commented 8 years ago

Sorry for my late reply. Thanks for brining this to my attention. This is an error on my part. I shouldn't have used a relative path from plantuml-encoder, but instead have used a relative path from pako.

I'll release a fix soon.

markushedvall commented 8 years ago

Fixed in 1.2.2 release