I think the esprima-fb error is a bug in npm, which is installing the wrong 
version of that module.

$ vi 
/Users/marcelk/Developer/apache/cordova-lib/cordova-lib/node_modules/cordova-js/node_modules/browserify/node_modules/derequire/node_modules/esprima-fb/package.json
  "version": "6001.1.0-dev-harmony-fb",

$ vi 
/Users/marcelk/Developer/apache/cordova-lib/cordova-lib/node_modules/cordova-js/node_modules/browserify/node_modules/derequire/package.json
  "dependencies": {
    "esprima-fb": "^3001.1.0-dev-harmony-fb"
  },

When running "npm shrinkwrap" it will fail if the version installed in 
node_modules differs from what is specified in the parent package.json. That is 
what the error means.

Not sure why this is happening, but bumping browserify to a recent version 
(which gets rid of the derequire dependency) in cordova-js clears it up.

Hmm, why does cordova-lib have a dependency on cordova-js?

On Sep 16, 2014, at 9:02 AM, Marcel Kinard <cmarc...@gmail.com> wrote:

> I'm getting the same error on esprima-fb when updating the shrinkwrap. I'll 
> update the browserify dependency, update the shrinkwrap, build a new tools 
> snapshot, publish it to npm as an rc for final testing, and post it for a 
> 24-hour vote. 
> 
> On Sep 15, 2014, at 11:30 PM, Carlos Santana <csantan...@gmail.com> wrote:
> 
>> I was trying myself to generate a npm-shrinkwrap.json and got an error
>> associated with the version of browserfy included in cordova-js which is
>> included in cordova-lib:-)
>> 0 info it worked if it ends with ok
>> 1 verbose cli [ 'node',
>> 1 verbose cli   '/Users/csantana23/.nvm/v0.10.31/bin/npm',
>> 1 verbose cli   'shrinkwrap' ]
>> 2 info using npm@1.4.27
>> 3 info using node@v0.10.31
>> 4 error Error: Problems were encountered
>> 4 error Please correct and try again.
>> 4 error invalid: esprima-fb@6001.1.0-dev-harmony-fb
>> /Users/csantana23/Documents/SWG/git/cordova/cordova-cli/node_modules/cordova-lib/node_modules/cordova-js/node_modules/browserify/node_modules/derequire/node_modules/esprima-fb
>> 4 erro
>> 
>> It looks we are using a 3 months old version 3.46
>> Latest is 5.11.2 https://www.npmjs.org/package/browserify
>> 
>> If we update cordova-js dependency for browserfy from 3.46 to 5.11.2 the
>> npm shrinkwrap command doesn't fail

Reply via email to