Skip to content

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

Description

@Rudloff

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 [email protected]
gyp info using [email protected] | 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,

Activity

  1. sebgod commented on Apr 25, 2014

    @sebgod

    I've the same since I upgraded to Ubuntu 14.04

  2. Rudloff commented on May 2, 2014

    @Rudloff
    Author

    Thanks for the hack, it works.

  3. Zren commented on May 10, 2014

    @Zren
  4. AaronM04 commented on May 28, 2014

    @AaronM04

    Hi. Is this hack still the best option?

  5. Bengt commented on Jun 4, 2014

    @Bengt

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

  6. AaronM04 commented on Jun 4, 2014

    @AaronM04

    Ah cool. I'll try that :)

  7. aviynw commented on Sep 2, 2014

    @aviynw

    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)

  8. cscott commented on Sep 16, 2014

    @cscott

    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.

  9. gustavofuhr commented on Sep 30, 2014

    @gustavofuhr

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

  10. bencevans commented on Dec 13, 2014

    @bencevans
  11. Pyohwan commented on Dec 18, 2014

    @Pyohwan

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

    I am using mongoose.

    ├─┬ [email protected]
    │ ├── [email protected]
    │ ├─┬ [email protected]
    │ │ ├── [email protected]
    │ │ └─┬ [email protected]
    │ │ ├── [email protected]
    │ │ ├── [email protected]
    │ │ ├── [email protected]
    │ │ └── [email protected]

    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

  12. khazamov commented on Feb 18, 2015

    @khazamov

    removing gyp helped me, thanks @aviynw

  13. iyogeshjoshi commented on Mar 27, 2015

    @iyogeshjoshi

    @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 ✗
    
    > [email protected] 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! [email protected] install: `node-gyp rebuild`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the [email protected] 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
  14. iyogeshjoshi commented on Mar 27, 2015

    @iyogeshjoshi

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

  15. davidcstevens commented on Jul 2, 2015

    @davidcstevens

    @aviynw thanks, that worked for me, too

  16. ljconde commented on Jul 20, 2015

    @ljconde

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

  17. pradhanshrijal commented on Aug 18, 2015

    @pradhanshrijal

    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

  18. ekg commented on Sep 24, 2015

    @ekg

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

  19. catskul commented on Sep 30, 2015

    @catskul

    @ekg worked for me as well. Thanks!

  20. drewboswell commented on Nov 8, 2015

    @drewboswell

    @aviynw removing it worked for me too, thanks!

  21. asoltys commented on Nov 25, 2015

    @asoltys

    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

  22. terotil commented on Dec 11, 2015

    @terotil

    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.

  23. maclover7 commented on Jul 20, 2018

    @maclover7
    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.

  24. added a commit that references this issue on Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions