GitHubDiom opened a new issue, #85:
URL: https://github.com/apache/openwhisk-composer/issues/85
Hi, community
The error occurs when I am trying to run a set of parallel actions.
> {
"error": "Internal error: Cannot find module 'redis-commands'\nRequire
stack:\n- /nodejsAction/runner.js\n- /nodejsAction/src/service.js\n-
/nodejsAction/app.js"
}
Here is my basic env info, the `/guest/image` itself can be run normally
```
$ wsk action list
actions
/guest/concur-images
private nodejs:14
/guest/image
private python:3
$ node -v
v10.24.0
```
I also wrote some scripts for building and invoking the parallel actions as
below:
`concur-images.js`
```shell
const composer = require('openwhisk-composer');
const workflow =
composer.par(
composer.action("image"),
composer.action("image"),
composer.action("image"),
)
module.exports = workflow
```
`build_concur_images.sh`
```shell
docker stop redis
docker rm redis
function_name="concur-images"
redis_container_id=$(docker run -itd --name redis -p 6379:6379 redis)
redis_container_ip=$(docker inspect --format '{{ .NetworkSettings.IPAddress
}}' $redis_container_id)
echo "IP = $redis_container_ip"
echo '{
"$composer": {
"openwhisk": {
"ignore_certs": true
},
"redis": {
"uri": "redis://'${redis_container_ip}':6379"
}
}
}' > ${function_name}-input.json
compose $function_name.js > $function_name.json
deploy $function_name $function_name.json -w
```
`invoke-concur-image.sh`
```shell
wsk action invoke -r /guest/concur-images -P concur-images-input.json
```
And I just run `./invoke-concur_image.sh` after `./build_concur_images.sh`,
then the error happends.
```shell
$ ./build_concur_images.sh
redis
redis
IP = 172.17.0.2
ok: created action /_/concur-images
$ ./invoke-concur_image.sh
{
"error": "Internal error: Cannot find module 'redis-commands'\nRequire
stack:\n- /nodejsAction/runner.js\n- /nodejsAction/src/service.js\n-
/nodejsAction/app.js"
}
```
Thank you
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]