-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Cannot find mongoose module with webpack #3713
Comments
#3578 (comment) seems to have gotten it working. I'm unfortunately not familiar with webpack yet (only have tried with browserify) but I'll take a look this week. |
Also, FWIW, there's a pre-built minified version of mongoose on cloudfront: http://d1l4stvdmqmdzl.cloudfront.net/4.3.2/mongoose.min.js if you're not adamant about plugging mongoose into your webpack build. I usually just use the cloudfront version. |
Hmm I think you need the node loader to include mongoose with webpack. Probably not ideal but I'm not an expert on webpack but module.exports = {
entry: './test.js',
output: {
path: __dirname,
filename: 'bundle.js'
},
module: {
loaders: [
{ test: /.*/, loader: 'node' }
]
}
};
|
The error is reproduced if you run the app. |
Thanks @vodkabears, above PR should be sufficient to fix this. |
Yep, i can confirm that mongodb driver with |
P.S. mongoose has a strict dependency https://github.com/Automattic/mongoose/blob/master/package.json#L23, so you should update it after the release. |
Yep will do, thanks. |
Getting the following error with webpack and mongoose -
Uncaught Error: Cannot find module '././binary_parser'
Below is my webpack.config.js and the mongoose version I am using is 4.3.3
The error is being thrown here
Can someone please point me in the right direction????
The text was updated successfully, but these errors were encountered: