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

Missing module.parent in Docker container #17

Closed
DenisCarriere opened this issue Jun 3, 2017 · 1 comment
Closed

Missing module.parent in Docker container #17

DenisCarriere opened this issue Jun 3, 2017 · 1 comment

Comments

@DenisCarriere
Copy link
Contributor

The strangest thing happened, everything works in Node 6 & 7, however whenever I bring conf into any of the latest Docker container (ex: node:6) it crashes.

https://github.com/sindresorhus/conf/blob/master/index.js#L13

Error on require

# node
> const Conf = require('conf')
TypeError: Path must be a string. Received null
    at assertPath (path.js:7:11)
    at Object.dirname (path.js:1324:5)
    at Object.<anonymous> (/usr/src/app/node_modules/conf/index.js:13:24)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)

Module parent does not exist

> module.parent
undefined
> module
Module {
  id: '<repl>',
  exports: {},
  parent: undefined,
  filename: null,
  loaded: false,
  children: [],
  paths:
   [ '/usr/src/app/repl/node_modules',
     '/usr/src/app/node_modules',
     '/usr/src/node_modules',
     '/usr/node_modules',
     '/node_modules',
     '/root/.node_modules',
     '/root/.node_libraries',
     '/usr/local/lib/node' ] }
DenisCarriere added a commit to DenisCarriere/conf that referenced this issue Jun 3, 2017
@DenisCarriere
Copy link
Contributor Author

👍 Works in Docker node:6 now

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

No branches or pull requests

1 participant