Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when building Postleaf #22

Closed
vanloc0301 opened this issue Jul 31, 2016 · 8 comments
Closed

Error when building Postleaf #22

vanloc0301 opened this issue Jul 31, 2016 · 8 comments

Comments

@vanloc0301
Copy link

vanloc0301 commented Jul 31, 2016

I have error when run command: npm install both at Windows 7/10 and Manjaro.
How to fix it? Thanks.

> gifsicle@0.1.7 postinstall /srv/http/postleaf/node_modules/gifsicle
> node index.js

path.js:7
    throw new TypeError('Path must be a string. Received ' + inspect(path));
    ^

TypeError: Path must be a string. Received { url: 'https://raw.github.com/imagemin/gifsicle-bin/v0.1.7/vendor/linux/x64/gifsicle',
  name: 'gifsicle',
  os: 'linux',
  arch: 'x64' }
    at assertPath (path.js:7:11)
    at Object.basename (path.js:1357:5)
    at /srv/http/postleaf/node_modules/download/index.js:35:43
    at each (/srv/http/postleaf/node_modules/each-async/each-async.js:63:4)
    at module.exports (/srv/http/postleaf/node_modules/download/index.js:33:5)
    at /srv/http/postleaf/node_modules/bin-wrapper/index.js:108:20
    at /srv/http/postleaf/node_modules/bin-wrapper/index.js:141:24
    at /srv/http/postleaf/node_modules/bin-check/index.js:30:20
    at /srv/http/postleaf/node_modules/executable/index.js:39:20
    at FSReqWrap.oncomplete (fs.js:123:15)
npm WARN install:gifsicle@0.1.7 gifsicle@0.1.7 postinstall: `node index.js`
npm WARN install:gifsicle@0.1.7 Exit status 1

> jpegtran-bin@0.2.8 postinstall /srv/http/postleaf/node_modules/jpegtran-bin
> node index.js


> optipng-bin@0.3.11 postinstall /srv/http/postleaf/node_modules/optipng-bin
> node index.js

path.js:7
    throw new TypeError('Path must be a string. Received ' + inspect(path));
    ^

TypeError: Path must be a string. Received { url: 'https://raw.github.com/imagemin/optipng-bin/v0.3.11/vendor/linux/x64/optipng',
  name: 'optipng',
  os: 'linux',
  arch: 'x64' }
    at assertPath (path.js:7:11)
    at Object.basename (path.js:1357:5)
    at /srv/http/postleaf/node_modules/download/index.js:35:43
    at each (/srv/http/postleaf/node_modules/each-async/each-async.js:63:4)
    at module.exports (/srv/http/postleaf/node_modules/download/index.js:33:5)
    at /srv/http/postleaf/node_modules/bin-wrapper/index.js:108:20
    at /srv/http/postleaf/node_modules/bin-wrapper/index.js:141:24
    at /srv/http/postleaf/node_modules/bin-check/index.js:30:20
    at /srv/http/postleaf/node_modules/executable/index.js:39:20
    at FSReqWrap.oncomplete (fs.js:123:15)
npm WARN install:optipng-bin@0.3.11 optipng-bin@0.3.11 postinstall: `node index.js`
npm WARN install:optipng-bin@0.3.11 Exit status 1

@claviska
Copy link
Contributor

Are you trying to install Postleaf or build it? There's a ready-to-use dist at www.postleaf.org/download if you're just trying to install it.

Not sure why you're seeing that error. I just rebuilt from scratch and NPM is working fine for me (but I can't test on Windows at the moment).

Anyone else seeing the same thing?

@vanloc0301
Copy link
Author

I tried build it from branch master of source in your repository.. I am sure that will occurs on most OS except MacOS. I reinstall Windows 10 to Windows 7, to Manjaro (distro build from Arch) and also have same error.

@claviska
Copy link
Contributor

What version of Node and NPM are you using?

@claviska claviska changed the title Error when install Postleaf Error when building Postleaf Jul 31, 2016
@claviska
Copy link
Contributor

claviska commented Jul 31, 2016

I think you might be having the same issue that's mentioned here. I'm not sure what the minimum versions of Node/NPM are, but I'm on Node 5.10.0 and NPM 3.8.3. My guess is you're running an older version and will need to upgrade to run the build.

@vanloc0301
Copy link
Author

I tested on node v6.3.0 - v6.3.1, npm 3.10.5.

@claviska
Copy link
Contributor

I tested on 6.22 and reproduced the problem. I'll report back when I figure out what's causing it.

@vanloc0301
Copy link
Author

Thanks @claviska . I using nvm test in Node 5.10.0 and don't have error.

@claviska
Copy link
Contributor

See 6241c96. It's building on Node 6.3.1 for me now. Thanks for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants