Skip to content
This repository has been archived by the owner on Mar 14, 2022. It is now read-only.

npm test failed #1

Open
htamakos opened this issue Jun 24, 2019 · 0 comments
Open

npm test failed #1

htamakos opened this issue Jun 24, 2019 · 0 comments

Comments

@htamakos
Copy link
Contributor

Issue Description

According to README, I ran tests. But errors occured like below.

$ npm test

> [email protected] test /Users/htamakos/.ghq/github.com/oracle/pgx-client-js
> mocha

/Users/htamakos/.ghq/github.com/oracle/pgx-client-js/node_modules/yargs/yargs.js:1163
      else throw err
           ^

TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received type undefined
    at validateString (internal/validators.js:107:11)
    at Module.require (internal/modules/cjs/loader.js:659:3)
    at require (internal/modules/cjs/helpers.js:16:16)
    at Object.<anonymous> (/Users/htamakos/.ghq/github.com/oracle/pgx-client-js/test/common.js:3:13)
    at Module._compile (internal/modules/cjs/loader.js:759:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
    at Module.load (internal/modules/cjs/loader.js:628:32)
    at Function.Module._load (internal/modules/cjs/loader.js:555:12)
    at Module.require (internal/modules/cjs/loader.js:666:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at Object.<anonymous> (/Users/htamakos/.ghq/github.com/oracle/pgx-client-js/test/algorithms.js:4:16)
    at Module._compile (internal/modules/cjs/loader.js:759:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
    at Module.load (internal/modules/cjs/loader.js:628:32)
    at Function.Module._load (internal/modules/cjs/loader.js:555:12)
    at Module.require (internal/modules/cjs/loader.js:666:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at /Users/htamakos/.ghq/github.com/oracle/pgx-client-js/node_modules/mocha/lib/mocha.js:330:36
    at Array.forEach (<anonymous>)
    at Mocha.loadFiles (/Users/htamakos/.ghq/github.com/oracle/pgx-client-js/node_modules/mocha/lib/mocha.js:327:14)
    at Mocha.run (/Users/htamakos/.ghq/github.com/oracle/pgx-client-js/node_modules/mocha/lib/mocha.js:804:10)
    at Object.exports.singleRun (/Users/htamakos/.ghq/github.com/oracle/pgx-client-js/node_modules/mocha/lib/cli/run-helpers.js:207:16)
    at exports.runMocha (/Users/htamakos/.ghq/github.com/oracle/pgx-client-js/node_modules/mocha/lib/cli/run-helpers.js:300:13)
    at Object.exports.handler (/Users/htamakos/.ghq/github.com/oracle/pgx-client-js/node_modules/mocha/lib/cli/run.js:296:3)
    at Object.runCommand (/Users/htamakos/.ghq/github.com/oracle/pgx-client-js/node_modules/yargs/lib/command.js:242:26)
    at Object.parseArgs [as _parseArgs] (/Users/htamakos/.ghq/github.com/oracle/pgx-client-js/node_modules/yargs/yargs.js:1104:24)
    at Object.parse (/Users/htamakos/.ghq/github.com/oracle/pgx-client-js/node_modules/yargs/yargs.js:566:25)
    at Object.exports.main (/Users/htamakos/.ghq/github.com/oracle/pgx-client-js/node_modules/mocha/lib/cli/cli.js:63:6)
    at Object.<anonymous> (/Users/htamakos/.ghq/github.com/oracle/pgx-client-js/node_modules/mocha/bin/_mocha:10:23)
    at Module._compile (internal/modules/cjs/loader.js:759:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
    at Module.load (internal/modules/cjs/loader.js:628:32)
    at Function.Module._load (internal/modules/cjs/loader.js:555:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:824:10)
    at internal/main/run_main_module.js:17:11
npm ERR! Test failed.  See above for more details.

Cause

At test/common.js, ORACLE_PGX_DIR environment variable is needed to load pgx-client-js module. But when npm test command is executed, this environment variable is not set. So Error (TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received type undefined) is occured.

https://github.com/oracle/pgx-client-js/blob/master/test/common.js#L3

htamakos referenced this issue in htamakos/pgx-client-js Jun 24, 2019
htamakos referenced this issue in htamakos/pgx-client-js Jun 24, 2019
martijndwars added a commit that referenced this issue Jul 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant