OPC UA Adaptor index.js error

0

Hi,
I followed the tutorial for the OPC UA adaptor for Greengrass. But, I got the below mentioned error for the lambda function.
[2019-02-13T16:54:13.431+01:00][INFO]-Running [arn:aws:lambda:eu-central-1:[Customer number]:function:Lambda_OPCUA:1]
[2019-02-13T16:54:13.436+01:00][ERROR]-Failed to import function handler index.handler due to exception: SyntaxError: Invalid regular expression flags
[2019-02-13T16:54:13.437+01:00][ERROR]-/lambda/index.js:30
[2019-02-13T16:54:13.437+01:00][ERROR]- certificateFile: /greengrass/certs/.pem.crt,
[2019-02-13T16:54:13.437+01:00][ERROR]- ^
[2019-02-13T16:54:13.437+01:00][ERROR]-SyntaxError: Invalid regular expression flags
[2019-02-13T16:54:13.437+01:00][ERROR]- at createScript (vm.js:80:10)
[2019-02-13T16:54:13.437+01:00][ERROR]- at Object.runInThisContext (vm.js:139:10)
[2019-02-13T16:54:13.437+01:00][ERROR]- at Module._compile (module.js:617:28)
[2019-02-13T16:54:13.437+01:00][ERROR]- at Object.Module._extensions..js (module.js:664:10)
[2019-02-13T16:54:13.437+01:00][ERROR]- at Module.load (module.js:566:32)
[2019-02-13T16:54:13.437+01:00][ERROR]- at tryModuleLoad (module.js:506:12)
[2019-02-13T16:54:13.437+01:00][ERROR]- at Function.Module._load (module.js:498:3)
[2019-02-13T16:54:13.437+01:00][ERROR]- at Module.require (module.js:597:17)
[2019-02-13T16:54:13.437+01:00][ERROR]- at require (internal/module.js:11:18)
[2019-02-13T16:54:13.437+01:00][ERROR]- at new Runtime (/runtime/nodejs6.10/lambda_nodejs_runtime.js:210:28)
[2019-02-13T16:54:14.128+01:00][INFO]-Running [arn:aws:lambda:eu-central-1:[Customer number]:function:Lambda_OPCUA:1]
[2019-02-13T16:54:14.133+01:00][ERROR]-Failed to import function handler index.handler due to exception: SyntaxError: Invalid regular expression flags
[2019-02-13T16:54:14.134+01:00][ERROR]-/lambda/index.js:30
[2019-02-13T16:54:14.134+01:00][ERROR]- certificateFile: /greengrass/certs/
.pem.crt,
[2019-02-13T16:54:14.134+01:00][ERROR]- ^
[2019-02-13T16:54:14.134+01:00][ERROR]-SyntaxError: Invalid regular expression flags
[2019-02-13T16:54:14.134+01:00][ERROR]- at createScript (vm.js:80:10)
[2019-02-13T16:54:14.134+01:00][ERROR]- at Object.runInThisContext (vm.js:139:10)
[2019-02-13T16:54:14.134+01:00][ERROR]- at Module._compile (module.js:617:28)
[2019-02-13T16:54:14.134+01:00][ERROR]- at Object.Module._extensions..js (module.js:664:10)
[2019-02-13T16:54:14.134+01:00][ERROR]- at Module.load (module.js:566:32)
[2019-02-13T16:54:14.134+01:00][ERROR]- at tryModuleLoad (module.js:506:12)
[2019-02-13T16:54:14.134+01:00][ERROR]- at Function.Module._load (module.js:498:3)
[2019-02-13T16:54:14.134+01:00][ERROR]- at Module.require (module.js:597:17)
[2019-02-13T16:54:14.134+01:00][ERROR]- at require (internal/module.js:11:18)
[2019-02-13T16:54:14.134+01:00][ERROR]- at new Runtime (/runtime/nodejs6.10/lambda_nodejs_runtime.js:210:28)
[2019-02-13T16:54:14.927+01:00][INFO]-Running [arn:aws:lambda:eu-central-1:[Customer number]:function:Lambda_OPCUA:1]
[2019-02-13T16:54:14.932+01:00][ERROR]-Failed to import function handler index.handler due to exception: SyntaxError: Invalid regular expression flags
[2019-02-13T16:54:14.933+01:00][ERROR]-/lambda/index.js:30
[2019-02-13T16:54:14.933+01:00][ERROR]- certificateFile: /greengrass/certs/.pem.crt,
[2019-02-13T16:54:14.933+01:00][ERROR]- ^
[2019-02-13T16:54:14.933+01:00][ERROR]-SyntaxError: Invalid regular expression flags
[2019-02-13T16:54:14.933+01:00][ERROR]- at createScript (vm.js:80:10)
[2019-02-13T16:54:14.933+01:00][ERROR]- at Object.runInThisContext (vm.js:139:10)
[2019-02-13T16:54:14.933+01:00][ERROR]- at Module._compile (module.js:617:28)
[2019-02-13T16:54:14.933+01:00][ERROR]- at Object.Module._extensions..js (module.js:664:10)
[2019-02-13T16:54:14.933+01:00][ERROR]- at Module.load (module.js:566:32)
[2019-02-13T16:54:14.933+01:00][ERROR]- at tryModuleLoad (module.js:506:12)
[2019-02-13T16:54:14.933+01:00][ERROR]- at Function.Module._load (module.js:498:3)
[2019-02-13T16:54:14.933+01:00][ERROR]- at Module.require (module.js:597:17)
[2019-02-13T16:54:14.933+01:00][ERROR]- at require (internal/module.js:11:18)
[2019-02-13T16:54:14.933+01:00][ERROR]- at new Runtime (/runtime/nodejs6.10/lambda_nodejs_runtime.js:210:28)
[2019-02-13T16:54:15.718+01:00][INFO]-Running [arn:aws:lambda:eu-central-1:[Customer number]:function:Lambda_OPCUA:1]
[2019-02-13T16:54:15.724+01:00][ERROR]-Failed to import function handler index.handler due to exception: SyntaxError: Invalid regular expression flags
[2019-02-13T16:54:15.725+01:00][ERROR]-/lambda/index.js:30
[2019-02-13T16:54:15.725+01:00][ERROR]- certificateFile: /greengrass/certs/
.pem.crt,
[2019-02-13T16:54:15.725+01:00][ERROR]- ^
[2019-02-13T16:54:15.725+01:00][ERROR]-SyntaxError: Invalid regular expression flags
[2019-02-13T16:54:15.725+01:00][ERROR]- at createScript (vm.js:80:10)
[2019-02-13T16:54:15.725+01:00][ERROR]- at Object.runInThisContext (vm.js:139:10)
[2019-02-13T16:54:15.725+01:00][ERROR]- at Module._compile (module.js:617:28)
[2019-02-13T16:54:15.725+01:00][ERROR]- at Object.Module._extensions..js (module.js:664:10)

Any help would be grateful.
Thanks,
Santosh

Edited by: SantoshPanda on Feb 13, 2019 8:35 AM

질문됨 5년 전175회 조회
1개 답변
0

Hi SantoshPanda,

I assume you're following this guide:
https://docs.aws.amazon.com/greengrass/latest/developerguide/opcua.html

Please attach the logs from your lambda, if any. Those logs are stored at:
[Greengrass-Install-Location]/ggc/var/log/user/[region]/[customer number]

Please also attach your index.js file.

Thanks,
Keagen

AWS
KR-AWS
답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠