Skip to content

🐛 sync-rpc failing with senseless error while pre-loading dotenv-azure #812

@aronhoyer

Description

@aronhoyer

When pre-loading dotenv-azure into a start script for an Azure Function, extractValue from sync-rpc throws an error without a message or code:

/path/to/project/directory/node_modules/sync-rpc/lib/index.js:167
    throw error;
    ^

Error
    at extractValue (/path/to/project/directory/node_modules/sync-rpc/lib/index.js:165:19)
    at /path/to/project/directory/node_modules/sync-rpc/lib/index.js:175:12
    at Object.<anonymous> (/path/to/project/directory/node_modules/dotenv-azure/config.js:5:20)
    at Module._compile (node:internal/modules/cjs/loader:1155:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
    at Module.load (node:internal/modules/cjs/loader:1033:32)
    at Function.Module._load (node:internal/modules/cjs/loader:868:12)
    at Module.require (node:internal/modules/cjs/loader:1057:19)
    at Module._preloadModules (node:internal/modules/cjs/loader:1332:12)
    at loadPreloadModules (node:internal/bootstrap/pre_execution:583:5) {
  code: undefined
}

The AZURE_APP_CONFIG_CONNECTION_STRING is set to a read-only connection string from our team's App Configuration.

Start script: node -r dotenv-azure/config scripts/start.js

Node version: v16.18.1
NPM version: v8.19.2

Repo: https://github.com/equinor/data-marketplace-adapter-service/tree/d2bfcda2e94f955c813dae597683de2fb24e8d42

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions