These modules are missing... #17
Comments
@qynAUGMN make sure you install the peer dependency Joi: > npm install --save joi |
Still not working for me |
This issue seems appear only with webpack. I forked isemail and removed the unneeded stuff (http://github.com/travelio/node-isemail) |
👏 On Friday, May 15, 2015, Sebastian Slomski notifications@github.com wrote:
|
hapijs/joi#528 seems to suggest isemail is not supported by the browser and should be shimmed for the client. |
@sebslomski How would you go about using this branch with Joi? Also how did you deal with the |
Any workarounds? |
As @jurassix mentioned, hapijs/joi#528 solves the problem. |
I just installed
Messages about missing 'net' and 'dns' modules now disappeared, but now I'm getting:
And it breaks build process of webpack. Any other ideas? P.S. As joi is not usable with webpack is it possible to switch to other validation libraries (business-rules-engine?)? |
@vguzev - currently this library only supports Joi; support for other validation engines will be available in the next major release. |
Sounds promising, but I'm afraid that we'll have to switch to something else before this release is available. I'm currently evaluating React validation modules for one big project. According to README.md react-validation-mixin is actually what we need, but I can't even evaluate it as it is not compatible with webpack... (( P.S. I think you should define some kind of "interfaces" for validation engines, so they could be pluggable. |
@vguzev you can now write your own strategy as of 5.0 |
How do you guys use this if not with webpack? I imagine browserify would have the same issues as webpack? |
PS. Haven't tested isemail-related functionality, but I followed hapijs/joi#528 (comment) and my bundle built with webpack. Wasn't aware of the |
@dminkovsky I use Browserify. The DEMO is also built using Browserify and emails validate correctly without any shims. I'll add a synopsis to the documentation for webpack so this information is straightforward to find for the next users. |
+1 |
Hi @jurassix. Thanks for that. I've also got emails validating with my webpack build. Doesn't do the whole DNS bit but that's what it is in the client without trying to get fancy. By the way, thanks for this module. A while back I opened an issue in the Ampersand repository basically suggesting this very module. Thanks for making this happen :). |
I'm also using webpack and getting the same errors. ERROR in ./ ERROR in ./ |
I had to add the following to my webpack config for my node app to get rid of those errors.
|
ERROR in ./
/joi/lib/string.js/joi/lib/string.js 3:10-24Module not found: Error: Cannot resolve module 'net' in /Users/russell/Work/augmn/tcms/node_modules/joi/lib
@ ./
ERROR in ./
/joi//isemail/lib/isemail.jsModule not found: Error: Cannot resolve module 'dns' in /Users/russell/Work/augmn/tcms/node_modules/joi/node_modules/isemail/lib
@ ./
/joi//isemail/lib/isemail.js 1188:18-32The text was updated successfully, but these errors were encountered: