Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gyp_main.py: error: no such option: --no-parallel #426

Closed
Rudloff opened this issue Apr 11, 2014 · 25 comments
Closed

gyp_main.py: error: no such option: --no-parallel #426

Rudloff opened this issue Apr 11, 2014 · 25 comments

Comments

@Rudloff
Copy link

Rudloff commented Apr 11, 2014

Hello,

When I try to install pg or bcrypt, I get the following error:

gyp info it worked if it ends with ok
gyp info using node-gyp@0.13.0
gyp info using node@0.10.21 | linux | x64
gyp info spawn python
gyp info spawn args [ '/usr/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/pierre/www/je-suis-ici-cartoviz/scripts/node_modules/pg/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/pierre/.node-gyp/0.10.21/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/pierre/.node-gyp/0.10.21',
gyp info spawn args   '-Dmodule_root_dir=/home/pierre/www/je-suis-ici-cartoviz/scripts/node_modules/pg',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/node-gyp/lib/configure.js:340:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.2.0-4-amd64
gyp ERR! command "node" "/usr/bin/node-gyp" "configure"
gyp ERR! cwd /home/pierre/www/je-suis-ici-cartoviz/scripts/node_modules/pg
gyp ERR! node -v v0.10.21
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok 

Regards,

@sebgod
Copy link

sebgod commented Apr 25, 2014

I've the same since I upgraded to Ubuntu 14.04

@ghost
Copy link

ghost commented May 2, 2014

there are two ways to solve this problem:

OR

  • hack the node_gyp
    If you don't want upgrade your gyp, you can just comment line 316 of /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js
    argv.push('-Dvisibility=default')
    argv.push('-Dnode_root_dir=' + nodeDir)
    argv.push('-Dmodule_root_dir=' + process.cwd())
    argv.push('--depth=.')
    //argv.push('--no-parallel')

@Rudloff
Copy link
Author

Rudloff commented May 2, 2014

Thanks for the hack, it works.

@Zren
Copy link

Zren commented May 10, 2014

This is the commit that added the --no-parallel option.

https://code.google.com/p/gyp/source/detail?r=1773&path=/trunk/pylib/gyp/__init__.py#

@AaronM04
Copy link

Hi. Is this hack still the best option?

@Bengt
Copy link

Bengt commented Jun 4, 2014

@AaronM04 upgrading gyp from source solved the compilation error for me and the hack was not necessary. (I am running Fedora 20.)

@AaronM04
Copy link

AaronM04 commented Jun 4, 2014

Ah cool. I'll try that :)

@aviynw
Copy link

aviynw commented Sep 2, 2014

If anyone is experiencing this problem on ubuntu, I hadn't realized that ubuntu has their own gyp package in the repositories that at some point got installed, as soon as I removed that, the npm version kicked I had installed in and this error went away(i.e. apt-get remove gyp)

@cscott
Copy link

cscott commented Sep 16, 2014

Would it be too much to ask that node-gyp run gyp --version or some such and refrain from adding the --no-parallel option if gyp is "too old"? That would save everyone a lot of trouble.

@gustavofuhr
Copy link

@aviynw, thanks man, this solve my problem in Ubuntu 14.04!

@bencevans
Copy link

@aviynw +1

@Pyohwan
Copy link

Pyohwan commented Dec 18, 2014

OS : amazon Linux 3.14.23-22.44.amzn1.x86_64
node version : v0.10.33

I am using mongoose.

├─┬ mongoose@3.8.20
│ ├── hooks@0.2.1
│ ├─┬ mongodb@1.4.12
│ │ ├── kerberos@0.0.4
│ │ └─┬ readable-stream@1.0.33
│ │ ├── core-util-is@1.0.1
│ │ ├── inherits@2.0.1
│ │ ├── isarray@0.0.1
│ │ └── string_decoder@0.10.31

be shown error message below when run node.

{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version

@khazamov
Copy link

removing gyp helped me, thanks @aviynw

@iyogeshjoshi
Copy link

@JeremyWei none of them worked for me,

  • I tried editing the /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js file but couldn't find --no-parallel option anywhere on that file.
  • Then I upgraded node-gyp to v1.0.3 which is latest available, still throwing the following error
apm install git-projects
Installing git-projects to /home/iyogeshjoshi/.atom/packages ✗

> git-utils@3.0.0 install /tmp/apm-install-dir-115227-7025-16poy8t/node_modules/git-projects/node_modules/git-utils
> node-gyp rebuild


Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/share/atom/resources/app/apm/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 3.16.0-33-generic
gyp ERR! command "node" "/usr/share/atom/resources/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tmp/apm-install-dir-115227-7025-16poy8t/node_modules/git-projects/node_modules/git-utils
gyp ERR! node -v v0.10.35
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok 
npm ERR! Linux 3.16.0-33-generic
npm ERR! argv "/usr/share/atom/resources/app/apm/bin/node" "/usr/share/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/iyogeshjoshi/.atom/.apm/.apmrc" "--userconfig" "/home/iyogeshjoshi/.atom/.apmrc" "install" "/tmp/d-115227-7025-esxv5v/package.tgz" "--target=0.21.0" "--arch=x64"
npm ERR! node v0.10.35
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! git-utils@3.0.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the git-utils@3.0.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the git-utils package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls git-utils
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-115227-7025-16poy8t/npm-debug.log

@ghost
Copy link

ghost commented Mar 27, 2015

@iyogeshjoshi from your logs, i think the right path of your configure.js is /usr/share/atom/resources/app/apm/node_modules/npm/node_modules/node-gyp/lib/configure.js

@iyogeshjoshi
Copy link

@JeremyWei yes that worked thanks 👍 .
Which means we have to do both the steps upgrade and then hacking configure.js file.

@davidcstevens
Copy link

@aviynw thanks, that worked for me, too

@ljconde
Copy link

ljconde commented Jul 20, 2015

@aviynw Uninstalling the gyp package in Ubuntu worked for me as well. Thanks!

@pradhanshrijal
Copy link

I tried to remove the gyp module, hack the configure.js file and it is still showing the same error. I also tried to remove the ~/.node-gyp folder. Still nothing.

I am using Debian Wheezy of BeagleBone Black
node v0.9.9
npm 0.2.15
node-gyp v2.0.2

@ekg
Copy link

ekg commented Sep 24, 2015

I ran into this problem and solved it via sudo apt-get remove gyp.

@catskul
Copy link

catskul commented Sep 30, 2015

@ekg worked for me as well. Thanks!

@drewboswell
Copy link

@aviynw removing it worked for me too, thanks!

@asoltys
Copy link

asoltys commented Nov 25, 2015

Upgrading the version of gyp used by npm worked for me:

sudo npm explore npm -g -- npm install node-gyp@latest

https://github.com/nodejs/node-gyp/wiki/Updating-npm%27s-bundled-node-gyp

@terotil
Copy link

terotil commented Dec 11, 2015

Upgrading bundled node-gyp didn't work for me, but removing OS gyp did. Thanks, @aviynw !

I tried to dig a little deeper into this. It just seems so wrong that you need to poke internals of bundled package or remove system packages. Looks like runGyp in node-gyp/lib/configure.js is genuinely trying to run the embedded gyp and only depend on python from OS

  // execute `gyp` from the current target nodedir
  argv.unshift(gyp_script)

  // make sure python uses files that came with this particular node package
  var pypath = new PathArray(process.env, 'PYTHONPATH')
  pypath.unshift(path.join(__dirname, '..', 'gyp', 'pylib'))

But apparently that isolation effort fails. Looks like a bug to me.

@maclover7
Copy link
Contributor

It seems like upgrading node-gyp to a supported version will fix this problem, so going to close this this ticket for now since a fix has been identified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests