Skip to content

nconf-issue with 0.20.4 (0.18.5 worked) #451

@tmtron

Description

@tmtron

Running my app with 0.18.5 worked, after updating to 0.20.4 it does not start anymore:

Here is the error when I try to start the app:

C:\dev\daqmon\dist\apps\server\nccdist\main.js:295376
        return __ncc_wildcard$0(store)[name];
                                      ^
TypeError: Cannot read property 'Argv' of undefined
    at module.exports.exports.Provider.Argv (C:\dev\daqmon\dist\apps\server\nccdist\main.js:295376:39)
    at module.exports.exports.Provider.module.exports.Provider.add (C:\dev\daqmon\dist\apps\server\nccdist\main.js:12735:33)
    at module.exports.exports.Provider.Provider.(anonymous function) [as argv] (C:\dev\daqmon\dist\apps\server\nccdist\main.js:
12642:21)

Here is some - maybe related - output the compiler:

ncc: Version 0.20.4
ncc: Compiling file index.js
Generating wildcard requires for C:\dev\daqmon\node_modules\nconf\lib\nconf\stores\*

Here is some related code of the ncc output .js files

Version 0.20.4 - not working

/*
 * nconf.js: Top-level include for the nconf module
 *
 * (C) 2011, Charlie Robbins and the Contributors.
 *
 */

function __ncc_wildcard$0 (arg) {
  if (arg === "argv.js") return __webpack_require__(7509);
  else if (arg === "env.js") return __webpack_require__(7653);
  else if (arg === "file.js") return __webpack_require__(5501);
  else if (arg === "literal.js") return __webpack_require__(3680);
  else if (arg === "memory.js") return __webpack_require__(4880);
}
var common = __webpack_require__(3675),
    Provider = __webpack_require__(332).Provider;

//
// `nconf` is by default an instance of `nconf.Provider`.
//
var nconf = module.exports = new Provider();

//
// Expose the version from the package.json
//
nconf.version = __webpack_require__(2325).version;

//
// Setup all stores as lazy-loaded getters.
//
['argv', 'env', 'file', 'literal', 'memory'].forEach(function (store) {
    var name = common.capitalize(store);

    nconf.__defineGetter__(name, function () {
        return __ncc_wildcard$0(store)[name];
    });
});

Version 0.18.05 - working:

/*
 * nconf.js: Top-level include for the nconf module
 *
 * (C) 2011, Charlie Robbins and the Contributors.
 *
 */

var common = __webpack_require__(6129),
    Provider = __webpack_require__(1699).Provider;

//
// `nconf` is by default an instance of `nconf.Provider`.
//
var nconf = module.exports = new Provider();

//
// Expose the version from the package.json
//
nconf.version = __webpack_require__(8112).version;

//
// Setup all stores as lazy-loaded getters.
//
['argv', 'env', 'file', 'literal', 'memory'].forEach(function (store) {
    var name = common.capitalize(store);

    nconf.__defineGetter__(name, function () {
        return __webpack_require__(3012)("./" + store)[name];
    });
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions