Closed aendra-rininsland closed 8 years ago
It looks like potentially an issue with the latest Bluebird dependency.
I also experienced this on Linux. I tried manually installing each of this package's dependencies and they all installed without any issue -- Bluebird included. This line looks particularly suspicious:
496 verbose link bins [ { editorconfig: 'bin\\editorconfig' }, '/usr/local/bin', true ]
Cloning the repository and then npm install -g .
it installed just fine.
Note that the package information on npmjs.org contains bin\\editorconfig
whilst the package.json in the repository does not.
Note that the package information on npmjs.org contains bin\editorconfig whilst the package.json in the repository does not.
Further, 0.12.2 specifies {bin: {editorconfig: "bin/editorconfig"}}
and npm install -g editorconfig@0.12.2
works just fine; where 0.13.0 specifies {bin: {editorconfig: "bin\\editorconfig"}}
The issue appears to stem from the way the package has been uploaded to the npmjs registry.
I'm getting the same issue on Arch Linux :cry:.
I don't think it has anything to do with bluebird because installing from git with npm install editorconfig/editorconfig-core-js
works perfectly. But I can confirm that the info in npm's couchdb instance looks wrong:
And strangely, each earlier version released by jed(mao|hunsaker) shows the same issue, while those by trey are fine:
@treyhunner: could you do a release from your machine as a quick fix?
@jedmao: are you running a windows box? (that would explain the difference, assuming trey is running something POSIX compliant)
@slang800, yes. I'm always running Windows. I've seen similar issues to this in the past and it seems to be a problem with npm itself, working differently across operating systems.
I just did another publish, but this time I published the v0.13.1.tar.gz
tagged archive instead of a direct npm publish
. This has worked for me in the past.
Let me know if this fixes things.
@jedmao That hasn't resolved it. The issue still remains in the NPM registry:
$ curl -s http://registry.npmjs.org/editorconfig | jq '.versions["0.13.1"].bin'
{
"editorconfig": "bin\\editorconfig"
}
And fails to install on *nix (this is on OS X):
$ npm install -g editorconfig@0.13.1
npm ERR! Darwin 15.0.0
npm ERR! argv "/Users/icio/.nvm/versions/v0.12.5/bin/node" "/Users/icio/.nvm/versions/v0.12.5/bin/npm" "install" "-g" "editorconfig@0.13.1"
...
npm ERR! enoent ENOENT, chmod '/Users/icio/.nvm/versions/v0.12.5/lib/node_modules/editorconfig/bin\editorconfig'
...
Looks like you should report this to the npm authors. Perhaps explicitly adding {"bin": {"editorconfig": "bin/editorconfig"}}
to your package.json -- instead of relying on npm to populate it -- will resolve publishing from windows. Otherwise, might be best to avoid publishing from Windows until it's resolved in npm.
@icio thanks for the advice. I added bin
to the package.json file in v0.13.2 and published.
The previous issue I was talking about was concerning line endings and the issue is already on npm here. It looks like this issue is different though.
As for avoiding publishing on Windows, I have no ability to do that, as everything in my house is Windows, including my phone :)
@jedmao I had a quick look and was unable to find another issue documenting this problem, so you might be right that this is different from any other that's been reported. Perhaps worth adding just in-case and letting them decide whether it's a duplicate.
Can confirm that the install now works on OS X.
As for avoiding publishing on Windows, I have no ability to do that, as everything in my house is Windows, including my phone :)
Fair enough, appears we've got it sorted anyway. Though you could use a virtual machine to run linux.
Thanks @icio. I submitted an issue to npm.
:+1:
Not sure why, this is the output. Seems it's trying to chmod a Windows-style path?
enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/editorconfig/bin\editorconfig'