You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2018/12/02 16:44:18 UTC

[GitHub] gandhirajan edited a comment on issue #159: mobile-spec project creation fails with error "Cannot find module 'cordova-common'"

gandhirajan edited a comment on issue #159: mobile-spec project creation fails with error "Cannot find module 'cordova-common'"
URL: https://github.com/apache/cordova-mobile-spec/issues/159#issuecomment-443501693
 
 
   @janpio 
   
   ```
   D:\Gandhi\Cordova\Cordova_git>node cordova-mobile-spec/createmobilespec/createmobilespec.js --android
   ### 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 android -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 (js, lib, plugman, cli)
   $ git symbolic-ref HEAD
   refs/heads/master
   $ git symbolic-ref HEAD
   refs/heads/master
   $ git symbolic-ref HEAD
   refs/heads/master
   $ git symbolic-ref HEAD
   refs/heads/master
   You are on master branch of tools, checking npm links
   npm links are OK
   ### Creating project mobilespec...
   $ D:\Gandhi\Cordova\Cordova_git\cordova-cli\bin\cordova create mobilespec org.apache.cordova.mobilespec MobileSpec_Tests --template cordova-mobile-spec\www
   Warning: using prerelease version 8.0.1-dev (cordova-lib@9.0.0-dev)
   Creating a new cordova project.
   ### Adding platforms...
   ### Adding Platform: android
   platformArg: D:\Gandhi\Cordova\Cordova_git\cordova-cli\bin\cordova D:\Gandhi\Cordova\Cordova_git\cordova-android
   $ D:\Gandhi\Cordova\Cordova_git\cordova-cli\bin\cordova platform add "D:\Gandhi\Cordova\Cordova_git\cordova-android" --verbose
   Warning: using prerelease version 8.0.1-dev (cordova-lib@9.0.0-dev)
   No scripts found for hook "before_platform_add".
   fetch: Installing D:\Gandhi\Cordova\Cordova_git\cordova-android to D:\Gandhi\Cordova\Cordova_git\mobilespec
   Running command: npm install D:\Gandhi\Cordova\Cordova_git\cordova-android --production --save
   Command finished with error code 0: npm install,D:\Gandhi\Cordova\Cordova_git\cordova-android,--production,--save
   Removing "cordova-" prefix from cordova-android
   Warning: using prerelease platform android@8.0.0-dev.
   Use 'cordova platform add android@latest' to add the latest published version instead.
   Adding android project...
   PlatformApi successfully found for platform android
   Creating Cordova project for the Android platform:
           Path: platforms\android
           Package: org.apache.mobilespec
           Name: mobilespec
           Activity: MainActivity
           Android target: android-27
   Copying android template project to platforms\android
   Cannot find module 'cordova-common'
   Error: Cannot find module 'cordova-common'
       at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
       at Function.Module._load (internal/modules/cjs/loader.js:506:25)
       at Module.require (internal/modules/cjs/loader.js:636:17)
       at require (internal/modules/cjs/helpers.js:20:18)
       at Object.<anonymous> (D:\Gandhi\Cordova\Cordova_git\mobilespec\platforms\android\cordova\lib\builders\builders.js:20:22)
       at Module._compile (internal/modules/cjs/loader.js:688:30)
       at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
       at Module.load (internal/modules/cjs/loader.js:598:32)
       at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
       at Function.Module._load (internal/modules/cjs/loader.js:529:3)
   ### Updating js for platforms...
   $ "D:\Installers\nodejs_latest\node.exe" D:\Gandhi\Cordova\Cordova_git\cordova-mobile-spec\createmobilespec\node_modules\grunt-cli\bin\grunt compile:android --platformVersion=8.0.0-dev
   Running "compile:android" (compile) task
   generated cordova.android.js @ 9490096bb175b2c04b614e40fecf7b7622522489 in 30ms
   
   Done.
   JavaScript file updated for android
   ### Adding plugins using CLI...
   Searchpath: D:\Gandhi\Cordova\Cordova_git\
   Installing local test framework plugins...
   $ D:\Gandhi\Cordova\Cordova_git\cordova-cli\bin\cordova plugin add org.apache.cordova.test.echo --searchpath D:\Gandhi\Cordova\Cordova_git\cordova-mobile-spec
   Warning: using prerelease version 8.0.1-dev (cordova-lib@9.0.0-dev)
   Installing "org.apache.cordova.test.echo" for android
   Unable to load PlatformApi from platform. Error: Cannot find module 'q'
   Failed to install 'org.apache.cordova.test.echo': Error [ERR_UNHANDLED_ERROR]: Unhandled error. (The platform "android" does not appear to be a valid cordova platform. It is missing API.js. android not supported.)
       at EventEmitter.emit (events.js:171:17)
       at EventEmitter.module.exports.emit (D:\Gandhi\Cordova\Cordova_git\cordova-common\src\events.js:71:17)
       at Object.getPlatformApiFunction (D:\Gandhi\Cordova\Cordova_git\cordova-lib\src\cordova\util.js:370:20)
       at Object.getPlatformApi (D:\Gandhi\Cordova\Cordova_git\cordova-lib\src\platforms\platforms.js:55:32)
       at handleInstall (D:\Gandhi\Cordova\Cordova_git\cordova-lib\src\plugman\install.js:580:29)
       at D:\Gandhi\Cordova\Cordova_git\cordova-lib\src\plugman\install.js:349:28
       at process._tickCallback (internal/process/next_tick.js:68:7)
   Unhandled error. (The platform "android" does not appear to be a valid cordova platform. It is missing API.js. android not supported.)
   $ D:\Gandhi\Cordova\Cordova_git\cordova-cli\bin\cordova plugin add D:\Gandhi\Cordova\Cordova_git\cordova-plugin-test-framework
   Warning: using prerelease version 8.0.1-dev (cordova-lib@9.0.0-dev)
   Installing "cordova-plugin-test-framework" for android
   Unable to load PlatformApi from platform. Error: Cannot find module 'q'
   Failed to install 'cordova-plugin-test-framework': Error [ERR_UNHANDLED_ERROR]: Unhandled error. (The platform "android" does not appear to be a valid cordova platform. It is missing API.js. android not supported.)
       at EventEmitter.emit (events.js:171:17)
       at EventEmitter.module.exports.emit (D:\Gandhi\Cordova\Cordova_git\cordova-common\src\events.js:71:17)
       at Object.getPlatformApiFunction (D:\Gandhi\Cordova\Cordova_git\cordova-lib\src\cordova\util.js:370:20)
       at Object.getPlatformApi (D:\Gandhi\Cordova\Cordova_git\cordova-lib\src\platforms\platforms.js:55:32)
       at handleInstall (D:\Gandhi\Cordova\Cordova_git\cordova-lib\src\plugman\install.js:580:29)
       at D:\Gandhi\Cordova\Cordova_git\cordova-lib\src\plugman\install.js:349:28
       at process._tickCallback (internal/process/next_tick.js:68:7)
   Unhandled error. (The platform "android" does not appear to be a valid cordova platform. It is missing API.js. android not supported.)
   $ D:\Gandhi\Cordova\Cordova_git\cordova-cli\bin\cordova plugin add D:\Gandhi\Cordova\Cordova_git\cordova-plugin-device
   Warning: using prerelease version 8.0.1-dev (cordova-lib@9.0.0-dev)
   Installing "cordova-plugin-device" for android
   Unable to load PlatformApi from platform. Error: Cannot find module 'q'
   Failed to install 'cordova-plugin-device': Error [ERR_UNHANDLED_ERROR]: Unhandled error. (The platform "android" does not appear to be a valid cordova platform. It is missing API.js. android not supported.)
       at EventEmitter.emit (events.js:171:17)
       at EventEmitter.module.exports.emit (D:\Gandhi\Cordova\Cordova_git\cordova-common\src\events.js:71:17)
       at Object.getPlatformApiFunction (D:\Gandhi\Cordova\Cordova_git\cordova-lib\src\cordova\util.js:370:20)
       at Object.getPlatformApi (D:\Gandhi\Cordova\Cordova_git\cordova-lib\src\platforms\platforms.js:55:32)
       at handleInstall (D:\Gandhi\Cordova\Cordova_git\cordova-lib\src\plugman\install.js:580:29)
       at D:\Gandhi\Cordova\Cordova_git\cordova-lib\src\plugman\install.js:349:28
       at process._tickCallback (internal/process/next_tick.js:68:7)
   Unhandled error. (The platform "android" does not appear to be a valid cordova platform. It is missing API.js. android not supported.)
   $ D:\Gandhi\Cordova\Cordova_git\cordova-cli\bin\cordova plugin add D:\Gandhi\Cordova\Cordova_git\cordova-plugin-whitelist
   Warning: using prerelease version 8.0.1-dev (cordova-lib@9.0.0-dev)
   Installing "cordova-plugin-whitelist" for android
   Unable to load PlatformApi from platform. Error: Cannot find module 'q'
   Failed to install 'cordova-plugin-whitelist': Error [ERR_UNHANDLED_ERROR]: Unhandled error. (The platform "android" does not appear to be a valid cordova platform. It is missing API.js. android not supported.)
       at EventEmitter.emit (events.js:171:17)
       at EventEmitter.module.exports.emit (D:\Gandhi\Cordova\Cordova_git\cordova-common\src\events.js:71:17)
       at Object.getPlatformApiFunction (D:\Gandhi\Cordova\Cordova_git\cordova-lib\src\cordova\util.js:370:20)
       at Object.getPlatformApi (D:\Gandhi\Cordova\Cordova_git\cordova-lib\src\platforms\platforms.js:55:32)
       at handleInstall (D:\Gandhi\Cordova\Cordova_git\cordova-lib\src\plugman\install.js:580:29)
       at D:\Gandhi\Cordova\Cordova_git\cordova-lib\src\plugman\install.js:349:28
       at process._tickCallback (internal/process/next_tick.js:68:7)
   Unhandled error. (The platform "android" does not appear to be a valid cordova platform. It is missing API.js. android not supported.)
   $ D:\Gandhi\Cordova\Cordova_git\cordova-cli\bin\cordova plugin add D:\Gandhi\Cordova\Cordova_git\cordova-plugin-battery-status
   Warning: using prerelease version 8.0.1-dev (cordova-lib@9.0.0-dev)
   Installing "cordova-plugin-battery-status" for android
   Unable to load PlatformApi from platform. Error: Cannot find module 'q'
   Failed to install 'cordova-plugin-battery-status': Error [ERR_UNHANDLED_ERROR]: Unhandled error. (The platform "android" does not appear to be a valid cordova platform. It is missing API.js. android not supported.)
       at EventEmitter.emit (events.js:171:17)
       at EventEmitter.module.exports.emit (D:\Gandhi\Cordova\Cordova_git\cordova-common\src\events.js:71:17)
       at Object.getPlatformApiFunction (D:\Gandhi\Cordova\Cordova_git\cordova-lib\src\cordova\util.js:370:20)
       at Object.getPlatformApi (D:\Gandhi\Cordova\Cordova_git\cordova-lib\src\platforms\platforms.js:55:32)
       at handleInstall (D:\Gandhi\Cordova\Cordova_git\cordova-lib\src\plugman\install.js:580:29)
       at D:\Gandhi\Cordova\Cordova_git\cordova-lib\src\plugman\install.js:349:28
       at process._tickCallback (internal/process/next_tick.js:68:7)
   Unhandled error. (The platform "android" does not appear to be a valid cordova platform. It is missing API.js. android not supported.)
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org