Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command line tool displays warning #419

Closed
matthew-white opened this issue Oct 20, 2021 · 1 comment · Fixed by #425
Closed

Command line tool displays warning #419

matthew-white opened this issue Oct 20, 2021 · 1 comment · Fixed by #425

Comments

@matthew-white
Copy link
Member

When I run odk-cmd user-create on a server running v1.3, I see the following warning:

(node:509) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)

I then ran the following command:

docker-compose exec service node --trace-warnings lib/bin/cli.js --email [email protected] user-create

and saw the following results:

(node:369) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:674:11)
    at Object.get (internal/modules/cjs/loader.js:688:5)
    at Object.exports.setLevels (/usr/odk/node_modules/winston/lib/winston/common.js:35:14)
    at Object.<anonymous> (/usr/odk/node_modules/winston/lib/winston.js:84:8)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Module.require (internal/modules/cjs/loader.js:961:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (/usr/odk/node_modules/prompt/lib/prompt.js:14:15)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Module.require (internal/modules/cjs/loader.js:961:19)
x3ro pushed a commit to x3ro/central-backend that referenced this issue Oct 24, 2021
The previously used version of the `prompt` dependency apparently had
a problem with a circular import, resulting in an error message such as

> Warning: Accessing non-existent property 'padLevels' of module
> exports inside circular dependency

when running the `cli.js` script. While it's unclear whether this
caused any functional issues, it's fixed in v1.2 of `prompt`.

Fixes getodk#419
x3ro pushed a commit to x3ro/central-backend that referenced this issue Oct 24, 2021
The previously used version of the `prompt` dependency apparently had
a problem with a circular import, resulting in an error message such as

> Warning: Accessing non-existent property 'padLevels' of module
> exports inside circular dependency

when running the `cli.js` script. While it's unclear whether this
caused any functional issues, it's fixed in v1.2 of `prompt`.

Fixes getodk#419
@matthew-white
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant