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

./cordova-mobile-spec/createmobilespec/createmobilespec.js is missing instruction to run `coho npm-link`

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      Tried to follow these instructions:
      https://github.com/apache/cordova-coho/blob/master/docs/platforms-release-process.md#what-to-test

      First command `./cordova-mobile-spec/createmobilespec/createmobilespec.js --android --forceplugins` failed though:

      sujan@LenovoX1:/mnt/c/Projects/Cordova/cordova-repos$ ./cordova-mobile-spec/createmobilespec/createmobilespec.js --windows --forceplugins
      Creating project from local git repos. If you have any errors, it may be from missing repositories.
      To clone repositories:
        ./cordova-coho/coho repo-clone -r mobile-spec -r plugin-test-framework -r cli -r lib -r plugman -r windows -r js -r plugins
        mkdir cordova-cli/node_modules
        (cd cordova-lib && npm install)
        (cd cordova-plugman/ && npm install)
        mkdir cordova-cli/node_modules
        ln -s ../../cordova-lib cordova-cli/node_modules
        (cd cordova-cli && npm install)
      To update all repositories:
        ./cordova-coho/coho repo-update
      Checking if you are using master branch of tools
      refs/heads/master
      refs/heads/master
      refs/heads/master
      refs/heads/master
      You are on master branch of tools, checking npm links
      /mnt/c/Projects/Cordova/cordova-repos/cordova-mobile-spec/createmobilespec/createmobilespec.js:410
              throw new Error('Module ' + linkedModule + ' is not installed at all (direct or npm-linked) in ' + installedModule);
              ^
      
      Error: Module cordova-js is not installed at all (direct or npm-linked) in cordova-lib
          at verifyNpmLinkOf (/mnt/c/Projects/Cordova/cordova-repos/cordova-mobile-spec/createmobilespec/createmobilespec.js:410:15)
          at Object.<anonymous> (/mnt/c/Projects/Cordova/cordova-repos/cordova-mobile-spec/createmobilespec/createmobilespec.js:427:9)
          at Module._compile (module.js:612:30)
          at Object.Module._extensions..js (module.js:623:10)
          at Module.load (module.js:531:32)
          at tryModuleLoad (module.js:494:12)
          at Function.Module._load (module.js:486:3)
          at Function.Module.runMain (module.js:653:10)
          at startup (bootstrap_node.js:187:16)
          at bootstrap_node.js:608:3
      

      After running `npm install` and `npm link` in some random subprojects (cordova-cli, cordova-lib, /cordova-mobile-spec/createmobilespec) it changed to this error:

      sujan@LenovoX1:/mnt/c/Projects/Cordova/cordova-repos$ ./cordova-mobile-spec/createmobilespec/createmobilespec.js --windows --forceplugins
      Creating project from local git repos. If you have any errors, it may be from missing repositories.
      To clone repositories:
        ./cordova-coho/coho repo-clone -r mobile-spec -r plugin-test-framework -r cli -r lib -r plugman -r windows -r js -r plugins
        mkdir cordova-cli/node_modules
        (cd cordova-lib && npm install)
        (cd cordova-plugman/ && npm install)
        mkdir cordova-cli/node_modules
        ln -s ../../cordova-lib cordova-cli/node_modules
        (cd cordova-cli && npm install)
      To update all repositories:
        ./cordova-coho/coho repo-update
      Checking if you are using master branch of tools
      refs/heads/master
      refs/heads/master
      refs/heads/master
      refs/heads/master
      You are on master branch of tools, checking npm links
      /mnt/c/Projects/Cordova/cordova-repos/cordova-mobile-spec/createmobilespec/createmobilespec.js:407
                  throw new Error('Module ' + linkedModule + ' installed in ' + installedModule + ' is not npm-linked. I recommend you run "coho npm-link".');
                  ^
      
      Error: Module cordova-js installed in cordova-lib is not npm-linked. I recommend you run "coho npm-link".
          at verifyNpmLinkOf (/mnt/c/Projects/Cordova/cordova-repos/cordova-mobile-spec/createmobilespec/createmobilespec.js:407:19)
          at Object.<anonymous> (/mnt/c/Projects/Cordova/cordova-repos/cordova-mobile-spec/createmobilespec/createmobilespec.js:427:9)
          at Module._compile (module.js:612:30)
          at Object.Module._extensions..js (module.js:623:10)
          at Module.load (module.js:531:32)
          at tryModuleLoad (module.js:494:12)
          at Function.Module._load (module.js:486:3)
          at Function.Module.runMain (module.js:653:10)
          at startup (bootstrap_node.js:187:16)
          at bootstrap_node.js:608:3
      

      After running `coho npm-link` the initial command actually worked and finished successfully.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Sujan12 Jan Piotrowski (janpio)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: