Not able to load dependent Npm Modules in Adobe IO Runtime
Hi All,
I have created the Node JS Post API module to be deployed to Adobe IO runtime.
I am making an Post call with query param and getting response when I directly run the index.js file my local.
Then I used wsk cli to create package and added the action inside it
https://developer.adobe.com/runtime/docs/guides/using/using_packages/
When I invoke the basic Hello name code by cmd -
wsk action invoke --result helloMyName/hello
I am getting the response
{"payload": "Hello stranger"}
Even I am able to deploy it using "wskdeploy" cmd and it is successful.
Then I modified the logic and added the Post Call login using "axios" module. I installed the axios package but still I am getting below axios module error while invoking the action.
C:/>wsk action invoke --result hellopackage/hello
{
"error": "An error has occurred: Error: Cannot find module 'axios'\nRequire stack:\n- /nodejsAction/runner.js\n- /nodejsAction/src/service.js\n- /nodejsAction/app.js"
}
I only have index.js file and no other file present in my local.

At top of index.js file added -
const axios = require('axios');
I have modified my manifest.yaml file as below with axios dependency but not able to deploy the package.

Getting below error :
C:/>wskdeploy -m manifest.yaml
Error: manifest_parser.go [123]: [ERROR_YAML_PARSER_ERROR]: File: [manifest.yaml]:
==> yaml: unmarshal errors:
==> line 9: cannot unmarshal !!str `^1.3.4` into parsers.Dependency
The action invoke error state it is not able to find the axios module but I am not able to add it in the manifest.yaml file only. It's there in package.json and npm_module folder.
Could you please help me in understanding the best way to add dependent npm module in Adobe IO runtime.
Thanks,
Prajwal