Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-7430

weinre does not play nice with npm dedupe

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: None
    • Component/s: weinre
    • Labels:
    • Environment:

      Ubuntu, node.js 0.10.31

      Description

      Weinre breaks if you dedupe your node dependencies. This happens because weinre assumes that coffee-script is located in the local node_modules folder, which might not be the case after npm dedupe.

      Error: Cannot find module '/Users/erikn/Code/eagle-ng/node_modules/grunt-weinre/node_modules/weinre/node_modules/coffee-script'
      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> (/Users/erikn/Code/eagle-ng/node_modules/grunt-weinre/node_modules/weinre/weinre:34:1)
      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)

        Activity

        Hide
        ralphtheninja Magnus Skog added a comment -

        I have a fix for this in the following PR on github:

        https://github.com/apache/cordova-weinre/pull/9

        Show
        ralphtheninja Magnus Skog added a comment - I have a fix for this in the following PR on github: https://github.com/apache/cordova-weinre/pull/9
        Hide
        pmuellr Patrick Mueller added a comment -

        Thanks for the pull request and bug report! The PR looks good (less code). Will give it a shot this weekend.

        Show
        pmuellr Patrick Mueller added a comment - Thanks for the pull request and bug report! The PR looks good (less code). Will give it a shot this weekend.
        Hide
        pmuellr Patrick Mueller added a comment -

        I've decided to create a more elaborate patch to remove CoffeeScript as a runtime dependency; it's in devDependencies now, and the build script will recompile the .coffee files into .js files. One less thing to de-dupe.

        Also upgraded the coffee-script, nopt and underscore versions in the package.json.template file to recent versions. Express has changed so much I decided to not upgrade to it's major version - but there has been a patch version since the last release that shows up here.

        This is currently in a branch CB-7430, per:

        https://github.com/apache/cordova-weinre/tree/CB-7430
        https://git-wip-us.apache.org/repos/asf?p=cordova-weinre.git;a=shortlog;h=refs/heads/CB-7430

        all in this commit:

        https://github.com/apache/cordova-weinre/commit/9b06777d6b23d1d2785b66a0e3f6f6c754561a08
        https://git-wip-us.apache.org/repos/asf?p=cordova-weinre.git;a=commit;h=9b06777d6b23d1d2785b66a0e3f6f6c754561a08

        I'll merge it in a few days, give you a chance to try it if you like.

        Show
        pmuellr Patrick Mueller added a comment - I've decided to create a more elaborate patch to remove CoffeeScript as a runtime dependency; it's in devDependencies now, and the build script will recompile the .coffee files into .js files. One less thing to de-dupe. Also upgraded the coffee-script, nopt and underscore versions in the package.json.template file to recent versions. Express has changed so much I decided to not upgrade to it's major version - but there has been a patch version since the last release that shows up here. This is currently in a branch CB-7430 , per: https://github.com/apache/cordova-weinre/tree/CB-7430 https://git-wip-us.apache.org/repos/asf?p=cordova-weinre.git;a=shortlog;h=refs/heads/CB-7430 all in this commit: https://github.com/apache/cordova-weinre/commit/9b06777d6b23d1d2785b66a0e3f6f6c754561a08 https://git-wip-us.apache.org/repos/asf?p=cordova-weinre.git;a=commit;h=9b06777d6b23d1d2785b66a0e3f6f6c754561a08 I'll merge it in a few days, give you a chance to try it if you like.
        Hide
        pmuellr Patrick Mueller added a comment -

        fixed in commit: 03084bdb6a23cc4f6085a16420df9182b2252e43

        published in release: 2.0.0-pre-HZO3BMNG (available at npm)

        Show
        pmuellr Patrick Mueller added a comment - fixed in commit: 03084bdb6a23cc4f6085a16420df9182b2252e43 https://git-wip-us.apache.org/repos/asf?p=cordova-weinre.git;a=commit;h=03084bdb6a23cc4f6085a16420df9182b2252e43 published in release: 2.0.0-pre-HZO3BMNG (available at npm)

          People

          • Assignee:
            pmuellr Patrick Mueller
            Reporter:
            ralphtheninja Magnus Skog
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development