hapijs / good

hapi process monitoring
Other
525 stars 161 forks source link

Cannot working with webpack #564

Closed Tin-Nguyen closed 6 years ago

Tin-Nguyen commented 7 years ago

hi all,

I'm trying to make good and hapi working with Webpack, however I currently get the issue when running the nodejs app

/Users/unifiedloaner/WORK_SPACE/src/github.com/test/dist/app.js:16929
                let Ctor = isFn ? spec.module : !(function webpackMissingModule() { var e = new Error("Cannot find module \".\""); e.code = 'MODULE_NOT_FOUND'; throw e; }());
                                                                                                                                                                ^
Error: Cannot find module "."
    at webpackMissingModule (/Users/unifiedloaner/WORK_SPACE/src/github.com/test/dist/app.js:16929:93)
    at internals.forOwn (/Users/unifiedloaner/WORK_SPACE/src/github.com/test/dist/app.js:16929:171)
    at Object.internals.forOwn (/Users/unifiedloaner/WORK_SPACE/src/github.com/test/dist/app.js:17030:9)
    at Monitor.start (/Users/unifiedloaner/WORK_SPACE/src/github.com/test/dist/app.js:16905:19)
    at Object.exports.register (/Users/unifiedloaner/WORK_SPACE/src/github.com/test/dist/app.js:16786:20)
    at Object.target [as register] (/Users/unifiedloaner/WORK_SPACE/src/github.com/test/dist/app.js:11246:34)
    at each (/Users/unifiedloaner/WORK_SPACE/src/github.com/test/dist/app.js:18026:14)
    at iterate (/Users/unifiedloaner/WORK_SPACE/src/github.com/test/dist/app.js:2911:13)
    at done (/Users/unifiedloaner/WORK_SPACE/src/github.com/test/dist/app.js:2903:25)
    at Object.register (/Users/unifiedloaner/WORK_SPACE/src/github.com/test/dist/app.js:14618:3)

I also got a warning when runing webpack build

WARNING in ./~/good/lib/monitor.js
129:48-68 Critical dependency: the request of a dependency is an expression

I'm using good version 7.2.0

DavidTPate commented 7 years ago

This isn't an error with good, it's something that is hit when WebPack encounters a require(...) call which is an expression. In the case of good this is used when loading modules.

You can find more details about this from WebPack here and it is typically solved either via aliases or require contexts.

lock[bot] commented 4 years ago

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.