Closed benfrain closed 8 years ago
@benfrain the reason is that the original image-size has glitchy SVG size calculation and on my private fork it was fixed. No PRs for image-size are getting merged, so I guess that the image-size was forbidden and we probably have to come up with another solution.
I'll study it this weekend and I'll try to see what can be done.
Thanks. appreciated :+1:
@benfrain I've just tried it on my Windows 10 machine with NodeJS v4.1.1 and git installed and it worked. Could you please share what particular environment do you have?
I'm on Windows 7, with node v0.12.7
I've tried this a few ways. npm install postcss-assets --save-dev
produces this:
npm install postcss-assets --save-dev
npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit at ChildProcess.exithandler (child_process.js:751:12)
npm WARN addRemoteGit at ChildProcess.emit (events.js:110:17)
npm WARN addRemoteGit at maybeClose (child_process.js:1015:16)
npm WARN addRemoteGit at Socket.
If I run:
npm install postcss-assets --save-dev --save-exact
I get this:
npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config -
-get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit at ChildProcess.exithandler (child_process.js:751:12)
npm WARN addRemoteGit at ChildProcess.emit (events.js:110:17)
npm WARN addRemoteGit at maybeClose (child_process.js:1015:16)
npm WARN addRemoteGit at Socket.
I had wondered if it might be some firewall issue where I am but the same thing installs fine on OS X.
@benfrain Can you try applying this patch https://github.com/borodean/postcss-assets/commit/2db229acf13708b9d9073a5486fe562cefb2a0e1?
Sorry for delay. Will do tomorrow
On 30 Sep 2015, at 23:26, Vadym Borodin notifications@github.com wrote:
@benfrain Can you try applying this patch 2db229a?
— Reply to this email directly or view it on GitHub.
@benfrain sorry, I've just realized that I've explained nothing on how to test this patch :smile:
So, I suggest cloning the patched branch to a new directory and then trying to npm install
from it. If it goes fine, the issue should be resolved and I'll draft a release.
@benfrain any updates?
OK, not sure if this is what you intended. I created a folder 'test-postcss-assets' in the root of my project. From there I ran git clone https://github.com/borodean/postcss-assets.git .
then updated my package.json to include this:
"postcss-assets": "./test-postcss-assets",
When I then do an npm install
I get this:
npm install
npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config -
-get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit at ChildProcess.exithandler (child_process.js:751:12)
npm WARN addRemoteGit at ChildProcess.emit (events.js:110:17)
npm WARN addRemoteGit at maybeClose (child_process.js:1015:16)
npm WARN addRemoteGit at Process.ChildProcess._handle.onexit (child_process.
js:1087:5)
npm WARN addRemoteGit borodean/image-size resetting remote C:\Users\benfrain\Ap
pData\Roaming\npm-cache\_git-remotes\git-github-com-borodean-image-size-git-1273
1099 because of error: { [Error: Command failed: git -c core.longpaths=true conf
ig --get remote.origin.url
npm WARN addRemoteGit ]
npm WARN addRemoteGit killed: false,
npm WARN addRemoteGit code: 1,
npm WARN addRemoteGit signal: null,
npm WARN addRemoteGit cmd: 'git -c core.longpaths=true config --get remote.ori
gin.url' }
npm ERR! git clone --template=C:\Users\benfrain\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/borodean/image-size.git C:\Users\benfrain\AppData\Roaming\npm-cache\_git-remotes\git-github-com-borodean-image-size-git-12731099: Cloning into bare repository 'C:\Users\benfrain\AppData\Roaming\npm-cache\_git-remotes\git-github-com-borodean-image-size-git-12731099'...
npm ERR! git clone --template=C:\Users\benfrain\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/borodean/image-size.git C:\Users\benfrain\AppData\Roaming\npm-cache\_git-remotes\git-github-com-borodean-image-size-git-12731099: fatal: unable to connect to github.com:
npm ERR! git clone --template=C:\Users\benfrain\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/borodean/image-size.git C:\Users\benfrain\AppData\Roaming\npm-cache\_git-remotes\git-github-com-borodean-image-size-git-12731099: github.com[0: 192.30.252.131]: errno=No error
canonical-path@0.0.2 node_modules\canonical-path
cssesc@0.1.0 node_modules\cssesc
mime@1.3.4 node_modules\mime
image-size@0.3.5 node_modules\image-size
@benfrain to solve all that mess with abandonned image-size library I'm going to migrate postcss-assets to calipers. It doesn't support SVG yet, but is actively developed so I'm going to contribute them. However, it means there would be no fix until SVG is done in calipers.
Hi Vadym,
Sure, I appreciate your efforts. Look forward to integrating it once that’s done.
Thanks again, Ben
On 1 Nov 2015, at 22:41, Vadym Borodin <notifications@github.com mailto:notifications@github.com> wrote:
@benfrain https://github.com/benfrain to solve all that mess with abandonned image-size https://github.com/netroy/image-size library I'm going to migrate postcss-assets to calipers https://github.com/lob/calipers. It doesn't support SVG yet https://github.com/lob/calipers/issues/29, but is actively developed so I'm going to contribute them. However, it means there would be no fix until SVG is done in calipers.
— Reply to this email directly or view it on GitHub https://github.com/borodean/postcss-assets/pull/30#issuecomment-152871045.
@benfrain image-size
library has updated. Could you install postcss-assets 3.0.3 and confirm the issue is gone for you?
@borodean excellent. I'll try and test tomorrow. Thanks. :+1:
No problem installing this plugin on my Mac system but when a fellow dev tries to install on a Windows 7 machine it fails to load. I believe it's to do with the way the path is specified to image-size: https://github.com/borodean/postcss-assets/blob/develop/package.json#L21
Is it possible change this to a full git url? Haven't done a PR for this incase there is a specific reason you don't want it that way.