Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

v3.0.0 - Error with Grunt build and serve tasks with initConfig() in Gruntfile.js

Karen MMar 24 2017 — edited May 2 2017

Hello,

I'm in the processing of upgrading to v3.0.0 following the instructions in the documentation.  My Gruntfile.js loads and registers other grunt tasks (in addition to the OracleJET's task) which require configurations defined in the initConfig.  If the grunt.initConfig({}) in the Gruntfile.js, JET's build and serve tasks encounter the following error and abort the task.

Task:       build

Error:      Running "build" task

               Running "oraclejet-build:undefined" (oraclejet-build) task
               Oracle JET Grunt plugin
               Processing Grunt command...
               JET Warning: Missing platform. Default to web.
              Warning: Cannot set property 'buildType' of undefined Use --force to continue.

               Aborted due to warnings.

Task:     serve

Error:     Running "serve" task

              Running "oraclejet-serve:undefined" (oraclejet-serve) task
              Oracle JET Grunt plugin
              Processing Grunt command...
              JET Warning: Missing platform. Default to web.
              Warning: Cannot read property 'connect' of undefined Use --force to continue.

              Aborted due to warnings.

I was able to reproduce the same error after scaffolding a new application from the Yeoman generator v3.0.0.  Added an empty grunt.initConfig({ }); between the require('load-grunt-config') and loadNpmTasks("grunt-oraclejet") in Gruntfile.js.  Performed grunt build and grunt serve; both tasks aborted with error.  Tried --force, it didn't work either.

Please let me know what need to be added to the initConfig so it both tasks would run successfully.

Thanks,

-karen

Comments

james_sutherland
This should work if using TopLink/EclipseLink.
1 - 1

Post Details

Added on Mar 24 2017
5 comments
2,176 views