How can I fix the "Cannot find module 'bplist-parser'" error with PhoneGap?

7,661

Simply update the dependencies with npm:

sudo npm update -g

and it will launch:

phonegap
Usage: phonegap [options] [commands]

Description:

  PhoneGap command-line tool.

Commands:

  help [command]       output usage information
  create <path>        create a phonegap project
  build <platforms>    build the project for a specific platform
  install <platforms>  install the project on for a specific platform
  run <platforms>      build and install the project for a specific platform
  platform [command]   update a platform version
  plugin [command]     add, remove, and list plugins
  template [command]   list available app templates
  ...

Source

My pronouns are He / Him

Share:
7,661

Related videos on Youtube

Tim
Author by

Tim

My name is Tim. I've graduated from the University of Nottingham with a First Class Computer Science BSc with Hons. In my spare time I do computer programming, often C or JavaScript, but also shell scripts, and answering questions on Stack Exchange. I used to spend most of my time on Ask Ubuntu; now I mostly browse the HNQ or Meta Stack Exchange. If you want to contact me it's [email protected] Do you need a reliable VPS? Try Digital Ocean. Sign up with this link for $10 free. One of my favourite sites is Kiva.org, a micro-funding organisation that allows people to lend money via the Internet to low-income entrepreneurs and students in over 80 countries. Kiva's mission is “to connect people through lending to alleviate poverty.” With just $25 you can make a difference - and 99% of loans are paid back in full - so you can lend again and again!

Updated on September 18, 2022

Comments

  • Tim
    Tim almost 2 years

    I've installed everything - node.js and then used npm to get PhoneGap.

    But then I get this error when I start PhoneGap:

    phonegap
    
    module.js:340
        throw err;
              ^
    Error: Cannot find module 'bplist-parser'
        at Function.Module._resolveFilename (module.js:338:15)
        at Function.Module._load (module.js:280:25)
        at Module.require (module.js:364:17)
        at require (module.js:380:17)
        at Object.<anonymous> (/usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/cordova-lib/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js:20:14)
        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 Module.require (module.js:364:17)
    
  • Tim
    Tim over 8 years
    I had this problem with Cordova. And the solution proposed for PhoneGap can be used for Cordova too. (It worked for me and I'm using Cordova.)