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

Install Errors on Windows (Space in Pathname) #9

Open
boxfoot opened this issue Nov 16, 2015 · 0 comments
Open

Install Errors on Windows (Space in Pathname) #9

boxfoot opened this issue Nov 16, 2015 · 0 comments

Comments

@boxfoot
Copy link

boxfoot commented Nov 16, 2015

When I install a package on Windows that depends on optipng, npm spits out the following errors. I'm not sure if they're actually from optipng or from npm, but I thought I'd start here.

The problem seems to be connected to how command parameters are quoted (or not), and dealing with spaces in the pathname. To reproduce, set up a user on windows who has a space in their user name, and then try to install optipng with npm.

> [email protected] postinstall c:\Users\Health Leads\git\my-project\node_modules\gulp-imagemin\node_modules\imagemin\node_modules\imagemin-optip
ng\node_modules\optipng-bin
> node lib/install.js

  ‼ Command failed: C:\Windows\system32\cmd.exe /s /c "c:\Users\Health Leads\git\my-project\node_modules\gulp-imagemin\node_modules\imagemin\node
_modules\imagemin-optipng\node_modules\optipng-bin\vendor\optipng.exe --version"
'c:\Users\Health' is not recognized as an internal or external command,
operable program or batch file.

  ‼ optipng pre-build test failed
  i compiling from source
  x Error: ./configure --with-system-zlib --prefix="c:\Users\Health Leads\git\my-project\node_modules\gulp-imagemin\node_modules\imagemin\node_mo
dules\imagemin-optipng\node_modules\optipng-bin\vendor" --bindir="c:\Users\Health Leads\git\my-project\node_modules\gulp-imagemin\node_modules\im
agemin\node_modules\imagemin-optipng\node_modules\optipng-bin\vendor" && make install
Command failed: C:\Windows\system32\cmd.exe /s /c "./configure --with-system-zlib --prefix="c:\Users\Health Leads\git\my-project\node_modules\gul
p-imagemin\node_modules\imagemin\node_modules\imagemin-optipng\node_modules\optipng-bin\vendor" --bindir="c:\Users\Health Leads\git\my-project\no
de_modules\gulp-imagemin\node_modules\imagemin\node_modules\imagemin-optipng\node_modules\optipng-bin\vendor""
'.' is not recognized as an internal or external command,
operable program or batch file.

    at ChildProcess.exithandler (child_process.js:203:12)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:818:16)
    at Socket.<anonymous> (internal/child_process.js:319:11)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:469:12)

Using node version 4.2.2, npm version 2.14.7

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

1 participant