Reputation: 4339
I'm following the example in the documentation for OpenWhisk to create a new Package Action, detailed here.
Running the wsk action invoke
step, the platform returns me an invocation error message.
[10:57:58 /tmp/workshop]$ wsk action invoke --blocking --result packageAction --param lines '[ "and now", "for something completely", "different" ]' { "error": "Initialization has failed due to: SyntaxError: Invalid or unexpected token at NodeActionRunner.init (/nodejsAction/runner.js:79:29) at doInit (/nodejsAction/src/service.js:134:31) at initCode (/nodejsAction/src/service.js:80:24) at /nodejsAction/app.js:62:13 at Layer.handle [as handle_request] (/nodejsAction/node_modules/express/lib/router/layer.js:95:5) at next (/nodejsAction/node_modules/express/lib/router/route.js:131:13) at Route.dispatch (/nodejsAction/node_modules/express/lib/router/route.js:112:3)\n at Layer.handle [as handle_request] (/nodejsAction/node_modules/express/lib/router/layer.js:95:5)\n at /nodejsAction/node_modules/express/lib/router/index.js:277:22\n at Function.process_params (/nodejsAction/node_modules/express/lib/router/index.js:330:12)" }
What's going wrong?
Upvotes: 0
Views: 497
Reputation: 4339
Package Actions is a new feature of the platform.
Ensure you have upgraded your OpenWhisk CLI to the latest version to support this feature. This bug can occur when using an older version of the cli to deploy package actions.
You can verify which version of the CLI you are running with the following command.
[14:49:21 /tmp/workshop]$ wsk property get whisk auth xxxx:xxx whisk API host openwhisk.ng.bluemix.net whisk API version v1 whisk namespace [email protected] whisk CLI version 2016-10-24T11:55:02+00:00 whisk API build 2016-10-24T12:04:22Z whisk API build number whisk-build-1260
Ensure that the CLI version matches or is greater than the version above.
Upvotes: 3