ricardofbarros / linter-js-standard

Atom linter plugin for JavaScript, using JavaScript Standard Style
https://atom.io/packages/linter-js-standard
MIT License
99 stars 48 forks source link

Windows: Can't install linter-js-standard #115

Closed drazisil closed 7 years ago

drazisil commented 8 years ago

OS: Windows 10 Arom: 1.7.4 Other plugins: git-plus, linter

I can't install linter-js-standard from either gui, or apm install linter-js-standard, it just hangs

I think this may be to due to severe recursion in the dependencies, as I had to use 7-zip due to delete the .atom folder due to nested node_module folders past the limit of what Windows can handle.

I deleted the folder because I was having the same issue with the prior version, which I'm afraid I didn't capture the version of.

Here is the error the console throws when attempting to install with apm:

C:\Users\Joseph>apm install linter-js-standard
Installing linter-js-standard to C:\Users\Joseph\.atom\packages failed

> spawn-sync@1.0.15 postinstall C:\Users\Joseph\AppData\Local\Temp\apm-install-dir-116423-8636-1bh8hd4\node_modules\linter-js-standard\node_modules\happiness\node_modules\happiness-format\node_modules\esformatter\node_modules\npm-run\node_modules\spawn-sync
> node postinstall

Installing native dependencies (this may take up to a minute)

> spawn-sync@1.0.15 postinstall C:\Users\Joseph\AppData\Local\Temp\apm-install-dir-116423-8636-1bh8hd4\node_modules\linter-js-standard\node_modules\standard\node_modules\standard-format\node_modules\esformatter\node_modules\npm-run\node_modules\spawn-sync
> node postinstall

Installing native dependencies (this may take up to a minute)

> spawn-sync@1.0.15 postinstall C:\Users\Joseph\AppData\Local\Temp\apm-install-dir-116423-8636-1bh8hd4\node_modules\linter-js-standard\node_modules\semistandard\node_modules\semistandard-format\node_modules\standard-format\node_modules\esformatter\node_modules\npm-run\node_modules\spawn-sync
> node postinstall

npm WARN engine deep-extend@0.4.1: wanted: {"node":">=0.12.0","iojs":">=1.0.0"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine get-stdin@5.0.1: wanted: {"node":">=0.12.0"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine get-stdin@5.0.1: wanted: {"node":">=0.12.0"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine is-buffer@1.1.3: wanted: {"node":">=0.12"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine is-buffer@1.1.3: wanted: {"node":">=0.12"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine is-buffer@1.1.3: wanted: {"node":">=0.12"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine is-buffer@1.1.3: wanted: {"node":">=0.12"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine is-buffer@1.1.3: wanted: {"node":">=0.12"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine is-buffer@1.1.3: wanted: {"node":">=0.12"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine is-buffer@1.1.3: wanted: {"node":">=0.12"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine is-buffer@1.1.3: wanted: {"node":">=0.12"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "C:\\Users\\Joseph\\AppData\\Local\\atom\\app-1.7.4\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\Joseph\\AppData\\Local\\atom\\app-1.7.4\\resources\\app\\apm\\node_modules\\npm\\bin\\npm-cli.js" "--globalconfig" "C:\\Users\\Joseph\\.atom\\.apm\\.apmrc" "--userconfig" "C:\\Users\\Joseph\\.atom\\.apmrc" "install" "C:\\Users\\Joseph\\AppData\\Local\\Temp\\d-116423-8636-jq7q43\\package.tgz" "--target=0.36.8" "--arch=ia32" "--msvs_version=2013"
npm ERR! node v0.10.40
npm ERR! npm  v2.13.3
npm ERR! file C:\WINDOWS\system32\cmd.exe
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn

npm ERR! spawn-sync@1.0.15 postinstall: `node postinstall`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the spawn-sync@1.0.15 postinstall script 'node postinstall'.
npm ERR! This is most likely a problem with the spawn-sync package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node postinstall
npm ERR! You can get their info via:
npm ERR!     npm owner ls spawn-sync
npm ERR! There is likely additional logging output above.

C:\Users\Joseph>

Please advise if I can provide any other info or tests.

ricardofbarros commented 8 years ago

Hey @drazisil, this is a problem that would be fixed if atom used npm@3 and a more recent node version. I really can't do nothing to fix this, sorry :( open an issue on atom. But for now I would recommend you to run apm install linter-js-standard@3.3.2

drazisil commented 8 years ago

That worked, thank you. How would I file against atom? Wouldn't they kick it back to you as the plugin writer writing against a version of npm not used in atom?

At any rate, closing this as issue is resolved.

ricardofbarros commented 8 years ago

Hey @drazisil , no the npm and node version aren't controlled by plugin but by the atom it self.

drazisil commented 8 years ago

Right, but in 3.3.3, aren't you writing it against a version of npm newer then what atom is using? This would lead me to believe that the atom team would say the incompatibility is your fault. (not trying to place blame per say, just trying to understand how I would word the bug report)

ricardofbarros commented 8 years ago

@drazisil Hmm ? No, each apm version is packed with a specific npm and node version. Just run apm -v and you will see.

I can't "write" the package to a specific npm version. It's all the same, it's a registry. What differ is the CLI tool version. Quoting from npm website:

npm3 resolves dependencies differently than npm2.

While npm2 installs all dependencies in a nested way, npm3 tries to mitigate the deep trees and redundancy that such nesting causes. npm3 attempts this by installing some secondary dependencies (dependencies of dependencies) in a flat way, in the same directory as the primary dependency that requires it.

source (https://docs.npmjs.com/how-npm-works/npm3)

ricardofbarros commented 8 years ago

There is a PR open right now that wants to upgrade to node@4 and npm@3

wcmd-andrew commented 8 years ago

That PR has been open since last October. Does that mean that going forward you'll be making updates to an Atom package that won't work in Atom until they merge that PR?

ricardofbarros commented 8 years ago

My future plans is to remove completely the linters from this package and use your local linters or the user insert the linters' bin path, so for now if you have the same issue just run apm install linter-js-standard@3.3.2

drazisil commented 8 years ago

apm install linter-js-standard@3.4.0 isn't working under Windows

Installing linter-js-standard@3.4.0 to C:\Users\Joseph\.atom\packages failed

> spawn-sync@1.0.15 postinstall C:\Users\Joseph\AppData\Local\Temp\apm-install-dir-116525-15136-18br91b\node_modules\linter-js-standard\node_modules\standard\node_modules\standard-format\node_modules\esformatter\node_modules\npm-run\node_modules\spawn-sync
> node postinstall

Installing native dependencies (this may take up to a minute)

> spawn-sync@1.0.15 postinstall C:\Users\Joseph\AppData\Local\Temp\apm-install-dir-116525-15136-18br91b\node_modules\linter-js-standard\node_modules\happiness\node_modules\happiness-format\node_modules\esformatter\node_modules\npm-run\node_modules\spawn-sync
> node postinstall

Installing native dependencies (this may take up to a minute)

> spawn-sync@1.0.15 postinstall C:\Users\Joseph\AppData\Local\Temp\apm-install-dir-116525-15136-18br91b\node_modules\linter-js-standard\node_modules\semistandard\node_modules\semistandard-format\node_modules\standard-format\node_modules\esformatter\node_modules\npm-run\node_modules\spawn-sync
> node postinstall

npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN engine deep-extend@0.4.1: wanted: {"node":">=0.12.0","iojs":">=1.0.0"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine get-stdin@5.0.1: wanted: {"node":">=0.12.0"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine get-stdin@5.0.1: wanted: {"node":">=0.12.0"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine is-buffer@1.1.3: wanted: {"node":">=0.12"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine is-buffer@1.1.3: wanted: {"node":">=0.12"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine is-buffer@1.1.3: wanted: {"node":">=0.12"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine is-buffer@1.1.3: wanted: {"node":">=0.12"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine is-buffer@1.1.3: wanted: {"node":">=0.12"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine is-buffer@1.1.3: wanted: {"node":">=0.12"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine is-buffer@1.1.3: wanted: {"node":">=0.12"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine is-buffer@1.1.3: wanted: {"node":">=0.12"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "C:\\Users\\Joseph\\AppData\\Local\\atom\\app-1.8.0\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\Joseph\\AppData\\Local\\atom\\app-1.8.0\\resources\\app\\apm\\node_modules\\npm\\bin\\npm-cli.js" "--globalconfig" "C:\\Users\\Joseph\\.atom\\.apm\\.apmrc" "--userconfig" "C:\\Users\\Joseph\\.atom\\.apmrc" "install" "C:\\Users\\Joseph\\AppData\\Local\\Temp\\d-116525-15136-12h05z4\\package.tgz" "--target=0.36.8" "--arch=ia32" "--msvs_version=2013"
npm ERR! node v0.10.40
npm ERR! npm  v2.13.3
npm ERR! code ELIFECYCLE

npm ERR! spawn-sync@1.0.15 postinstall: `node postinstall`
npm ERR! Exit status -1
npm ERR!
npm ERR! Failed at the spawn-sync@1.0.15 postinstall script 'node postinstall'.
npm ERR! This is most likely a problem with the spawn-sync package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node postinstall
npm ERR! You can get their info via:
npm ERR!     npm owner ls spawn-sync
npm ERR! There is likely additional logging output above.

Do you have any updated instructions on how to install, or am I still out of luck until Atom updates?

install linter-js-standard@3.3.2 still works

marvinroger commented 8 years ago

@drazisil it still won't work on Windows, but Atom merged https://github.com/atom/apm/pull/457https://github.com/atom/apm/pull/457, so the next Atom release is likely to fix this issue.

itsnotvalid commented 8 years ago

@ricardofbarros what I would suggest is to modify the "engines" key in package.json like so:

  "engines": {
    "atom": ">1.8.0"
  },

What this does is to limit the releases to be automatically installed for future versions of Atom (like 1.9) only, without making errors for current users.

(seen this being used in https://github.com/jesseweed/seti-ui )

marvinroger commented 8 years ago

@itsnotvalid there are no issues with Linux and Mac in 1.8.x

Fa-So commented 8 years ago

Works also not yet in Atom Beta Channel for Windows

ricardofbarros commented 8 years ago

Yup @itsnotvalid, thanks for the heads up.

noahtallen commented 8 years ago

Got the same error as well on my laptop. Interestingly, it worked totally fine on my desktop Windows 10 machine. To the best of my knowledge, the software versions are quite similar if not identical on both machines since the installation on both was within a couple of days of each other.

ricardofbarros commented 8 years ago

@ntomallen which linter-js-standard version do you have installed on your desktop ?

noahtallen commented 8 years ago

@ricardofbarros Desktop version is 3.4.1 That was installed via lookup in the actual Atom app about three days ago.

ricardofbarros commented 8 years ago

Hmm strange, could you drop the stdout of apm -v ?

noahtallen commented 8 years ago

@ricardofbarros on Desktop: C:\Users\noaht>apm -v apm 1.9.2 npm 2.13.3 node 0.10.40 python git 2.9.0.windows.1 visual studio 2012 On Laptop: apm 1.9.2 npm 2.13.3 node 0.10.40 python 3.5.2 git 2.8.1.windows.1 visual studio 2012

marvinroger commented 8 years ago

Bad news: Atom 1.9.0 does not fix the issue. Good news: 1.10.0-beta does fix it! :tada:

ricardofbarros commented 8 years ago

Hey, has this been fixed?

raygesualdo commented 8 years ago

I was able to install it successfully, but wasn't able to use it. The plugin errored out when I would open a JS file. Supposedly Atom 1.12 should fix it with the v8 bump. Haven't tested that though.

ricardofbarros commented 8 years ago

thanks for your prompt answer @raygesualdo 😃