leepowelldev / mongoose-validator

Validators for mongoose models utilising validator.js
MIT License
379 stars 43 forks source link

error in new version #41

Closed eran10 closed 7 years ago

eran10 commented 7 years ago

Uncaught Error: Cannot find module "./default-error-messages" at webpackMissingModule

are you missing something ?

leepowelldev commented 7 years ago

Shouldn't be - default-error-messagesis a json file which when loaded by node is parsed. Node attempts to add the .json extension by default. Maybe webpack isn't and that's whats causing the issue. Sorry I'm not a familiar with webpack in fine detail. Could you try modifying the source and adding the .json extension - see if that sorts your issue. If it does then I'm happy to make the change and push out a new patch version.

leepowelldev commented 7 years ago

Just looking at the webpack docs - would the json-loader work for you here?