meltingice / psd.js

A Photoshop PSD file parser for NodeJS and browsers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: PSD.open is not a function

hkshakib opened this issue · comments

let PSD = require('psd');
var file = process.argv[2] || './examples/images/example.psd';
var start = new Date();

PSD.open(file).then(function (psd) {
return psd.image.saveAsPng('./output.png');
}).then(function () {
console.log("Finished in " + ((new Date()) - start) + "ms");
});;

When I run this code, it shows the following error

Hi @hkshakib,
Which version are of psd are you using?

Got a PR open that should resolve this.

PR: #244

This should be fixed in the latest 3.4.0 release.