Git Product home page Git Product logo

spawn-sync's Introduction

spawn-sync

This used to be a polyfill for require('child_process').spawnSync but now all actively maintained node versions already support spawnSync, so this is just a stub that re-exports spawnSync.

Usage

You should remove this library from your dependencies and just do:

var spawnSync = require('child_process').spawnSync;

var result = spawnSync('node',
                       ['filename.js'],
                       {input: 'write this to stdin'});

if (result.status !== 0) {
  process.stderr.write(result.stderr);
  process.exit(result.status);
} else {
  process.stdout.write(result.stdout);
  process.stderr.write(result.stderr);
}

License

MIT

spawn-sync's People

Contributors

bengl avatar dhruvbird avatar forbeslindesay avatar leobalter avatar mbleigh avatar patrickkettner avatar satazor avatar szydan avatar thomheymann avatar umcodemonkey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

spawn-sync's Issues

Failed to intall [email protected] postinstall: `node postinstall`

[ERROR] npm ERR! Linux 2.6.32-220.4.2.el6.x86_64
[ERROR] npm ERR! node v7.9.0
[ERROR] npm ERR! npm v4.2.0
[ERROR] npm ERR! file sh
[ERROR] npm ERR! path sh
[ERROR] npm ERR! code ELIFECYCLE
[ERROR] npm ERR! errno ENOENT
[ERROR] npm ERR! syscall spawn sh
[ERROR]
[ERROR] npm ERR! [email protected] postinstall: node postinstall
[ERROR] npm ERR! spawn sh ENOENT
[ERROR] npm ERR!
[ERROR] npm ERR! Failed at the [email protected] postinstall script 'node postinstall'.
[ERROR] npm ERR! Make sure you have the latest version of node.js and npm installed.
[ERROR] npm ERR! If you do, this is most likely a problem with the spawn-sync package,
[ERROR] npm ERR! not with npm itself.
[ERROR] npm ERR! Tell the author that this fails on your system:
[ERROR] npm ERR! node postinstall
[ERROR] npm ERR! You can get information on how to open an issue for this project with:
[ERROR] npm ERR! npm bugs spawn-sync
[ERROR] npm ERR! Or if that isn't available, you can get their info via:
[ERROR] npm ERR! npm owner ls spawn-sync
[ERROR] npm ERR! There is likely additional logging output above.

Error - spawn-sync permission denied

$ sudo npm install -g yo

output

> [email protected] postinstall /usr/local/lib/node_modules/yo/node_modules/cross-spawn/node_modules/spawn-sync
> node postinstall

|
fs.js:438
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: EACCES, permission denied '/usr/local/lib/node_modules/yo/node_modules/cross-spawn/node_modules/spawn-sync/package.json'
    at Object.fs.openSync (fs.js:438:18)
    at Object.fs.writeFileSync (fs.js:977:15)
    at Object.<anonymous> (/usr/local/lib/node_modules/yo/node_modules/cross-spawn/node_modules/spawn-sync/postinstall.js:20:6)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3
npm ERR! Linux 3.13.0-53-generic
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "yo"
npm ERR! node v0.10.33
npm ERR! npm  v2.10.0
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `node postinstall`
npm ERR! Exit status 8
npm ERR! 
npm ERR! Failed at the [email protected] 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.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/francis/npm-debug.log

npm-debug.log

22391 info postuninstall [email protected]
22392 silly gentlyRm /usr/local/lib/node_modules/yo/node_modules/cross-spawn is being purged from base /usr/local
22393 verbose gentlyRm don't care about contents; nuking /usr/local/lib/node_modules/yo/node_modules/cross-spawn
22394 silly vacuum-fs purging /usr/local/lib/node_modules/yo/node_modules/cross-spawn
22395 silly vacuum-fs quitting because other entries in /usr/local/lib/node_modules/yo/node_modules
22396 verbose unbuild lib/node_modules/yo
22397 info preuninstall [email protected]
22398 info uninstall [email protected]
22399 verbose unbuild rmStuff [email protected] from /usr/local/lib/node_modules
22400 silly gentlyRm /usr/local/bin/yo is being gently removed
22401 silly gentlyRm verifying /usr/local is an npm working directory
22402 silly gentlyRm containing path /usr/local is under npm's control, in /usr/local
22403 silly gentlyRm deletion target /usr/local/bin/yo is under /usr/local
22404 verbose gentlyRm vacuuming from /usr/local/bin/yo up to /usr/local
22405 info postuninstall [email protected]
22406 silly gentlyRm /usr/local/lib/node_modules/yo is being purged from base /usr/local
22407 verbose gentlyRm don't care about contents; nuking /usr/local/lib/node_modules/yo
22408 silly vacuum-fs purging /usr/local/lib/node_modules/yo
22409 silly vacuum-fs quitting because other entries in /usr/local/lib/node_modules

Cannot install because permissions denied

> [email protected] postinstall /project/node_modules/spawn-sync
> node postinstall


fs.js:439
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: EACCES, permission denied 'project/node_modules/spawn-sync/package.json'
    at Object.fs.openSync (fs.js:439:18)
    at Object.fs.writeFileSync (fs.js:978:15)
    at Object.<anonymous> (/project/node_modules/spawn-sync/postinstall.js:33:6)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:935:3
npm ERR! Linux 3.13.0-48-generic
npm ERR! argv "node" "/usr/bin/npm" "install" "spawn-sync"
npm ERR! node v0.10.37
npm ERR! npm  v2.8.3
npm ERR! code ELIFECYCLE

I installed with --ignore-scripts and see that this file (package.json) has root as owner. So my user cannot write to file in your postinstall script

'node postinstall' failing with error ELIFECYCLE

While installing react-native, which has dependency on spawn-sync, installation is failing with the following error

> [email protected] postinstall /home/mmmanan/Projects/AwesomeProject/AwesomeProject/node_modules/react-native/node_modules/yeoman-generator/node_modules/cross-spawn/node_modules/spawn-sync
> node postinstall

Segmentation fault
npm ERR! Linux 3.16.0-38-generic
npm ERR! argv "/root/.nvm/versions/node/v4.1.0/bin/node" "/root/.nvm/versions/node/v4.1.0/bin/npm" "install" "--save" "react-native"
npm ERR! node v4.1.0
npm ERR! npm  v2.14.3
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `node postinstall`
npm ERR! Exit status 139
npm ERR! 
npm ERR! Failed at the [email protected] 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.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/mmmanan/Projects/AwesomeProject/AwesomeProject/npm-debug.log
`npm install --save react-native` failed

Maximum stack size exceeded

I get this error on v0.10:

/Users/david/.../node_modules/spawn-sync/lib/json-buffer/index.js:39
    return JSON.stringify(/^:/.test(o) ? ':' + o : o)
                               ^
RangeError: Maximum call stack size exceeded

UPDATE

Only happens when stdout/err is inherited:

spawnSync(process.argv[0], process.argv.slice(1), { stdio: ['ignore', process.stdout, process.stderr] })

I did this workaround to avoid buffering on >= 0.12:

var spawnSync = require('child_process').spawnSync
var spawnSyncFallback = require('spawn-sync')
if (spawnSync) {
  spawnSync(process.argv[0], process.argv.slice(1),
    { stdio: ['ignore', process.stdout, 'ignore'] }
  )
} else {
  var res = spawnSyncFallback(process.argv[0], process.argv.slice(1),
    { stdio: ['ignore', 'pipe', 'ignore'] }
  )
  process.stdout.write(res.stdout) // very buffering
}

dependency discrepancy

Not quite sure what's going on here but when I run npm install [email protected] I get a package.json which has a single dependency declared:

{
  "name": "spawn-sync",
  "version": "1.0.6",
  "dependencies": {
    "concat-stream": "^1.4.7"
  }
}

However, its node_modules folder contains the following two dependencies:

  • concat-stream: 1.4.8
  • os-shim: 0.1.2

This conflict causes npm shrinkwrap and npm ls to rightfully fail and complain about extraneous modules:

npm ERR! extraneous: [email protected] ./node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/bin-check/node_modules/spawn-sync/node_modules/os-shim

Running npm info [email protected] on the other hand has the extra dependency listed:

dependencies: { 'concat-stream': '^1.4.7', 'os-shim': '^0.1.2' }

Has this version been published correctly or is this a local problem with my npm?

ENOENT when invoking spawnSync on Node 0.10 / Ubuntu

ENOENT, no such file or directory '/tmp/spawn-sync_output_549843d802a98140c4b99d4af'

Receiving this with a pretty straightforward invocation of spawn-sync:

var spawnSync = require('spawn-sync');
var result = spawnSync('my-command', {
  input: someString,
  timeout: 10000,
  encoding: 'utf-8'
});

Any ideas on what might be the cause?

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Added the new Node.js version to your .travis.yml

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

'node postinstall' failing with error ENOENT

A recent update to one of our dependencies pulled in spawn-sync which is consistently causing npm install to fail on our build servers. Note that our build servers are running Windows.

Here's the full error trace:

111127 verbose stack Error: [email protected] postinstall: `node postinstall`
111127 verbose stack spawn C:\Windows\system32\cmd.exe ENOENT
111127 verbose stack     at exports._errnoException (util.js:746:11)
111127 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
111127 verbose stack     at child_process.js:1144:20
111127 verbose stack     at process._tickCallback (node.js:355:11)
111128 verbose pkgid [email protected]
111129 verbose cwd C:\BuildAgents\WorkFolders\1-3\48dcf735\MarketingOps.UI
111130 error Windows_NT 6.3.9600
111131 error argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
111132 error node v0.12.7
111133 error npm  v2.11.3
111134 error file C:\Windows\system32\cmd.exe
111135 error path C:\Windows\system32\cmd.exe
111136 error code ELIFECYCLE
111137 error errno ENOENT
111138 error syscall spawn C:\Windows\system32\cmd.exe
111139 error [email protected] postinstall: `node postinstall`
111139 error spawn C:\Windows\system32\cmd.exe ENOENT
111140 error Failed at the [email protected] postinstall script 'node postinstall'.
111140 error This is most likely a problem with the spawn-sync package,
111140 error not with npm itself.
111140 error Tell the author that this fails on your system:
111140 error     node postinstall
111140 error You can get their info via:
111140 error     npm owner ls spawn-sync
111140 error There is likely additional logging output above.
111141 verbose exit [ 1, true ]

Provide environmental mechanism to opt out of soft-warnings.

This package is installed by yargs which is a CLI argument parser. The default behaviour of this package means that all such CLI packages now have unavoidable output.

Please consider adding an environment variable or other that would allow indirect consumers of this module to avoid the console output.

An in-range update of try-thread-sleep is breaking the build 🚨

Version 1.0.1 of try-thread-sleep just got published.

Branch Build failing 🚨
Dependency try-thread-sleep
Current Version 1.0.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As try-thread-sleep is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build is in progress Details

  • continuous-integration/appveyor/branch AppVeyor build failed Details

Commits

The new version differs by 1 commits .

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

"Invalid data" error when writing result.stderr to process.stderr

Commit 5d1d0b9 introduces a bug in cases where the spawned process does not write to stderr or stdout. Rather than an empty buffer, result.stdout and result.stderr are represented by an empty array. Attempting to write the array to an output stream fails with:

TypeError: invalid data
    at WriteStream.Socket.write (net.js:612:11)

Test case

Please add a test case that writes to only one or neither of stderr and stdout. The result can be verified with an assertion like Buffer.isBuffer(result.stderr).

Temporary workaround

I have temporarily avoided this by fencing any write operations with a check against the buffer (or in this case, array) length:

if (result.stderr.length > 0) {
    process.stderr.write(result.stderr);
}

proposal: remove the postinstall script

As seen with #11 and others, the postinstall script is prone to issues. In the case of #11, it's because npm drops permissions before running the lifecycle scripts, so if sudo was used to install spawn-sync (as is the case when many people install yo, which depends on spawn-sync), the install errors out.

Since spawn-sync is probably most useful in CLI-tools, and unfortunately, many CLI-tools are designed to be installed with -g, this problem is bound to keep coming up.

The solutions provided on the ticket (--unsafe-perms and using a node version manager so that things are installed in user directories and sudo isn't needed) aren't really ideal. Let's just nuke it and install all the dependencies all the time. Maybe there's a better solution, but I think it's worth backpedalling here to not break installs.

In short, I'm not sure saving some time in install is worth breaking the install for piles and piles of yo and other CLI-tool users.

node 0.10.x and npm@3 extraneous deps

When using node 0.10 and npm@3 (I tried with [email protected] and [email protected]), using spawn-sync as a subdependency results in extraneous dependencies being installed. Normally this wouldn't be an issue, but an internal client of mine was trying to then run npm shrinkwrap, which failed due to these extraneous dependencies.

A simple solution is to simply run npm prune to get rid of them, but it would be great if there was some solution to this that could be done in spawn-sync's postinstall.

Repro steps:

mkdir ~/spawnsynctest
$ cd ~/spawnsynctest
$ cat <<EOF > package.json
{
  "dependencies": {
    "grunt-sass": "~1.1.0"
  }
}
EOF
$ nvm use v0.10.40
$ npm i -g [email protected]
$ npm i
$ npm ls > /dev/null
npm ERR! extraneous: [email protected] /home/bengl/spawnsynctest/node_modules/concat-stream
npm ERR! extraneous: [email protected] /home/bengl/spawnsynctest/node_modules/os-shim

Strings, not buffer objects

the result object for the fallback method have Buffer objects on the stdout and stderr properties.

iojs and 0.12 both return string values for them instead of buffer objects.

It would be good to fix this for a stardard utilization.

Error on postinstall

I'm trying to install 'yo' but when it gets to spawn-sync, I get an error like this:

npm verb stack Error: [email protected] postinstall: `node postinstall`                                                
npm verb stack Exit status 1                                                                                           
npm verb stack     at EventEmitter.<anonymous> (<node path>\node_modules\npm\lib\utils\lifecycle.js:2
13:16)                                                                                                                 
npm verb stack     at EventEmitter.emit (events.js:110:17)                                                             
npm verb stack     at ChildProcess.<anonymous> (<node path>\node_modules\npm\lib\utils\spawn.js:24:14
)                                                                                                                      
npm verb stack     at ChildProcess.emit (events.js:110:17)                                                             
npm verb stack     at maybeClose (child_process.js:1015:16)                                                            
npm verb stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)                                    
npm verb pkgid [email protected]                                                                                       
npm verb cwd <current directory>                                                                                                 
npm ERR! Windows_NT 6.1.7601                                                                                           
npm ERR! argv "<node path>\\nodejs\\node.exe" "<node path>\\nodejs\\node_modules\\npm\\bin\\n
pm-cli.js" "install" "-g" "--verbose" "yo"                                                                             
npm ERR! node v0.12.7                                                                                                  
npm ERR! npm  v2.11.3                                                                                                  
npm ERR! code ELIFECYCLE                                                                                               

npm ERR! [email protected] postinstall: `node postinstall`                                                             
npm ERR! Exit status 1                                                                                                 

I am behind a proxy which sometimes causes certain issues. I don't think it's the problem in this case but I don't really know.

npm installation issue

Hey!

I was trying to install your package globally, but whenever I try to do it, I get following output:

MacBook:folder Lukasz$ sudo npm i spawn-sync -g

[email protected] postinstall /usr/local/lib/node_modules/spawn-sync
node postinstall

sh: node: command not found
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "spawn-sync" "-g"
npm ERR! node v5.0.0
npm ERR! npm v3.3.6
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn

npm ERR! [email protected] postinstall: node postinstall
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] 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.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/Lukasz/Desktop/folder/npm-debug.log

I was wondering if the problem is known, or this is an issue with my npm/node. I run Node 5.0.0 and Npm 3.3.6.

Thanks,
Lukasz

Install with non-default npm

Unfortunately, some build systems are less than awesome.

In such cases as the one I'm dealing with, the npm being used isn't the one found on the PATH, so this this line executes a different version of npm compared to the one that was originally run. For us, this creates some chaos.

Maybe there's a way of finding the full path of the npm that was originally executed, and running that instead?

npm install does not work with spaces in path (path to npm not correctly quoted)

When node is installed in a path with spaces in the name, the postinstall command failes with the following error:

> [email protected] postinstall D:\7560\64\src\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-pngquant\node_modules\pngquant-bin\node_modules\bin-wrapper\node_modules\bin-check\node_modules\spawn-sync
> node postinstall


D:\7560\64\src\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-pngquant\node_modules\pngquant-bin\node_modules\bin-wrapper\node_modules\bin-check\node_modules\spawn-sync\postinstall.js:40
      throw err;
            ^
Error: Command failed: 'C:\Program' is not recognized as an internal or external command,

operable program or batch file.


    at ChildProcess.exithandler (child_process.js:648:15)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:756:16)
    at Process.ChildProcess._handle.onexit (child_process.js:823:5)

Related commit: f1de876

I assume the reason is, that the process.env.npm_execpath variable contains spaces. On my machine its "C:\Progam Files\nodejs".

OS X install failing due to permission error

On attempting to do an install of ionic (global) which depends on node-sass, which depends on spawn-sync, it fails due to a permissions issue in the spawn-sync install.
This is in OS X 10.10.5 (Darwin 14.5.0), node v4.4.3, npm v2.15.1. The attempted install is of [email protected] .
The result of running "sudo npm install -g -ddd spawn-sync > npm.log 2> npm.err " is attached.

npm.err.txt
npm.log.txt

Cannot find module '/root/.nvm/v6.11.3/lib/node_modules/yo/node_modules/spawn-sync/postinstall'

node -v v6.11.3
nodejs -v v0.10.40
npm -v 5.4.0

OS:
NAME="CentOS Linux"
VERSION="7

Error Details:

npm install -g yo
/root/.nvm/v6.11.3/bin/yo -> /root/.nvm/v6.11.3/lib/node_modules/yo/lib/cli.js
/root/.nvm/v6.11.3/bin/yo-complete -> /root/.nvm/v6.11.3/lib/node_modules/yo/lib/completion/index.js

[email protected] postinstall /root/.nvm/v6.11.3/lib/node_modules/yo/node_modules/spawn-sync
node postinstall

module.js:471
throw err;
^

Error: Cannot find module '/root/.nvm/v6.11.3/lib/node_modules/yo/node_modules/spawn-sync/postinstall'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:502:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: node postinstall
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

Failed at the [email protected] postinstall script 'node postinstall'.

Hi there.

I encounter the below error when trying to install polymer-cli. I get the error "Failed at the [email protected] postinstall script 'node postinstall'".Please help. See the below traces for further details:

'sudo npm install -g polymer-cli
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
/usr/local/bin/polymer -> /usr/local/lib/node_modules/polymer-cli/bin/polymer.js

[email protected] install /usr/local/lib/node_modules/polymer-cli/node_modules/dtrace-provider
node scripts/install.js

sh: node: command not found
npm WARN install:[email protected] [email protected] install: node scripts/install.js
npm WARN install:[email protected] spawn ENOENT

[email protected] postinstall /usr/local/lib/node_modules/polymer-cli/node_modules/spawn-sync
node postinstall

sh: node: command not found
/usr/local/lib
└── (empty)

npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "polymer-cli"
npm ERR! node v4.4.7
npm ERR! npm v3.10.4
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn

npm ERR! [email protected] postinstall: node postinstall
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node postinstall'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, 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 information on how to open an issue for this project with:
npm ERR! npm bugs spawn-sync
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls spawn-sync
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/lenkwe/Sanlam/Mobile/Ionic/npm-debug.log
npm ERR! code 1'

npm install doesn't work

Since spawn-sync v1.0.5, they is an error in npm install :

> [email protected] postinstall /usr/local/lib/node_modules/clients-cli/node_modules/spawn-sync
> node postinstall


/usr/local/lib/node_modules/clients-cli/node_modules/spawn-sync/postinstall.js:38
      throw err;
            ^
Error: Command failed: npm ERR! Linux 3.16.0-30-generic
npm ERR! argv "node" "/usr/local/bin/npm" "install" "--production"
npm ERR! node v0.10.31
npm ERR! npm  v2.1.17

npm ERR! Uncaught, unspecified "error" event.
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /usr/local/lib/node_modules/clients-cli/node_modules/spawn-sync/npm-debug.log

    at ChildProcess.exithandler (child_process.js:648:15)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:756:16)
    at Process.ChildProcess._handle.onexit (child_process.js:823:5)
npm ERR! Linux 3.16.0-30-generic
npm ERR! argv "node" "/usr/local/bin/npm" "install" "." "-g"
npm ERR! node v0.10.31
npm ERR! npm  v2.1.17
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `node postinstall`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the [email protected] 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.

The error doesn't occur on 1.0.2

fwd: spawn-sync 1.0.13 FAILs at 'node postinstall'

"Please let @ForbesLindesay know by forwarding this issue over to https://github.com/ForbesLindesay/spawn-sync"

fwd'ing, per request, from: Glavin001/atom-beautify#467

Running

atom --version
    1.0.3-9774b20
node -v
    v2.4.0
npm -v
    2.13.0

Upgrading atom-beautify from installed v0.28.7 to v0.28.8 FAILs:

Updating to “[email protected]” failed.

> [email protected] postinstall /tmp/apm-install-dir-115617-5652-1i1ck6n/node_modules/atom-beautify/node_modules/cross-spawn/node_modules/spawn-sync
> node postinstall

module.js:340
    throw err;
          ^
Error: Cannot find module '/tmp/apm-install-dir-115617-5652-1i1ck6n/node_modules/atom-beautify/node_modules/cross-spawn/node_modules/spawn-sync/postinstall'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:929:3
npm ERR! Linux 4.1.1-2.gcac28b3-desktop
npm ERR! argv "/usr/local/share/atom/resources/app/apm/bin/node" "/usr/local/share/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/pgnd/.atom/.apm/.apmrc" "--userconfig" "/home/pgnd/.atom/.apmrc" "install" "/tmp/d-115617-5652-1qpfmy7/package.tgz" "--target=0.22.0" "--arch=x64"
npm ERR! node v0.10.35
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `node postinstall`
npm ERR! Exit status 8
npm ERR! 
npm ERR! Failed at the [email protected] 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.

npm ERR! Please include the following file with any support request:
npm ERR!     /tmp/apm-install-dir-115617-5652-1i1ck6n/npm-debug.log

ls -al /tmp/apm-install-dir-115617-5652-1i1ck6n/npm-debug.log
    ls: cannot access /tmp/apm-install-dir-115617-5652-1i1ck6n/npm-debug.log: No such file or directory

spawn-sync appears to cause problem with update to Atom package zotero-citations

I have not been able to update the zotero-citations for Markdown package on Atom editor.
I am on Mac OS X 10.10.5, Atom 1.3.2
The output I get is:


Updating to “[email protected]” failed.Hide output…

[email protected] postinstall /private/var/folders/99/n4khbrf10cz3mk15pb3cpxsh0000gn/T/apm-install-dir-11605-34980-bsfmfw/node_modules/zotero-citations/node_modules/sync-request/node_modules/spawn-sync
node postinstall

npm ERR! Darwin 14.5.0
npm ERR! argv "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/Users/christopherpoor/.atom/.apm/.apmrc" "--userconfig" "/Users/christopherpoor/.atom/.apmrc" "install" "/private/var/folders/99/n4khbrf10cz3mk15pb3cpxsh0000gn/T/d-11605-34980-14b4cg8/package.tgz" "--target=0.34.3" "--arch=x64"
npm ERR! node v0.10.40
npm ERR! npm v2.13.3
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn

npm ERR! [email protected] postinstall: node postinstall
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] 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.

npm ERR! Please include the following file with any support request:
npm ERR! /private/var/folders/99/n4khbrf10cz3mk15pb3cpxsh0000gn/T/apm-install-dir-11605-34980-bsfmfw/npm-debug.log


I also just tried
$ npm install spawn-sync

and got:

[email protected] postinstall /Users/christopherpoor/node_modules/spawn-sync
node postinstall

/Users/christopherpoor
├── [email protected]
└── [email protected]

npm WARN enoent ENOENT: no such file or directory, open '/Users/christopherpoor/package.json'
npm WARN christopherpoor No description
npm WARN christopherpoor No repository field.
npm WARN christopherpoor No README data
npm WARN christopherpoor No license field.


Any help much appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.