Closed ishamf closed 8 years ago
I get a similar error on Windows 8.1, when the linter-js-standard package (3.4.1) is enabled.
same here:
> spawn-sync@1.0.15 postinstall C:\Users\engs1397\AppData\Local\Temp\apm-install-dir-116723-5880-1atxi7x\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\engs1397\AppData\Local\Temp\apm-install-dir-116723-5880-1atxi7x\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
> spawn-sync@1.0.15 postinstall C:\Users\engs1397\AppData\Local\Temp\apm-install-dir-116723-5880-1atxi7x\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)
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 ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Users\\engs1397\\AppData\\Local\\atom\\app-1.9.8\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\engs1397\\AppData\\Local\\atom\\app-1.9.8\\resources\\app\\apm\\node_modules\\npm\\bin\\npm-cli.js" "--globalconfig" "C:\\Users\\engs1397\\.atom\\.apm\\.apmrc" "--userconfig" "C:\\Users\\engs1397\\.atom\\.apmrc" "install" "C:\\Users\\engs1397\\AppData\\Local\\Temp\\d-116723-5880-1y2vwv2\\package.tgz" "--target=0.37.8" "--arch=ia32"
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.
This should be filed on get-stdin
then, or possibly standard-engine
? Another possibility is that this is something odd about how Atom's embedded Node.js works, but I'm less inclined to think that's the case.
@dariosalviwork Yours looks to be a different issue, caused by the severely out of date version of node
embedded within APM. This should be fixed in Atom v1.10.0, you can either switch to the beta channel or just wait till that lands on stable.
Actually those are just warnings, the failure is it tries to call spawn
, which doesn't exist on Windows 😕.
Actually, I'm not really sure where to fix this. I've created a pull request in get-stdin
that should fix this, but it might be better to fix it on Electron instead, making process.stdin
return some kind of noop stream.
This is fixed in recent versions of electron.
In other words: install Atom >= 1.12.0-beta1
When a recent version of standard is installed in the project, the plugin wouldn't use it.
I tried to step through the code, and here's what I found:
requireWithLocalOverride
tries to load the project'sstandard
standard
loadsstandard-engine
standard-engine
loadsget-stdin
get-stdin
tries to accessprocess.stdin
(even when it's only required and not used).process.stdin
inside Atom throws an exception on windowsrequireWithLocalOverride
loads the default version of standard insteadThe older version of standard works because it requires an old version of
get-stdin
, which doesn't always accessprocess.stdin
.