Azure / azure-postgresql

Azure Database for PostgreSQL (fully managed service for PostgreSQL in Azure)
MIT License
78 stars 78 forks source link

Error in the Azure Function #66

Open elies92 opened 4 years ago

elies92 commented 4 years ago

When I run the Azure function I have this error :

2019-11-12T17:18:10.653 [Information] Executing 'Functions.EventHubTrigger1' (Reason='', Id=3d0bb39e-8661-47b6-9ba7-0e3ea3821109) 2019-11-12T17:18:10.700 [Error] Executed 'Functions.EventHubTrigger1' (Failed, Id=3d0bb39e-8661-47b6-9ba7-0e3ea3821109) Result: Failure Exception: Error: Cannot find module 'pg' Stack: Error: Cannot find module 'pg' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at module.exports (D:\home\site\wwwroot\EventHubTrigger1\index.js:2:14) at WorkerChannel.invocationRequest (D:\Program Files (x86)\SiteExtensions\Functions\2.0.12858\32bit\workers\node\worker-bundle.js:16506:26) at ClientDuplexStream.WorkerChannel.eventStream.on (D:\Program Files (x86)\SiteExtensions\Functions\2.0.12858\32bit\workers\node\worker-bundle.js:16386:30) at ClientDuplexStream.emit (events.js:198:13) at addChunk (_stream_readable.js:288:12) at readableAddChunk (_stream_readable.js:269:11)

Do you know where it could come from (knowing that I did install pg before running the function) ?

Thank you.

luisacodev commented 3 years ago

you should execute "npm install pg" in local