Webpack build with version 3.2.8 is failing
See original GitHub issueWhen using the latest version from NPM (3.2.8) with webpack, the following error occurres:
ERROR in ./node_modules/jquery-validation-unobtrusive/dist/jquery.validate.unobtrusive.js
Module not found: Error: Can't resolve 'jquery.validate' in '[path]\node_modules\jquery-validation-unobtrusive\dist'
@ ./node_modules/jquery-validation-unobtrusive/dist/jquery.validate.unobtrusive.js 11:8-75
@ multi bootstrap jquery jquery-validation jquery-validation-unobtrusive popper.js
I think webpack tries to resolve jquery.validate as a dependency (via AMD define) but it fails because it’s probably known within webpack as jquery-validation. A workaround is to add the following rule to the webpack config:
module: {
rules: [
{
parser: {
amd: false,
}
},
...other rules...
]
}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:19 (7 by maintainers)
Top Results From Across the Web
webpack is failing while trying to compile in production mode
I've been using React 16.x.x and Jqwidgets 6.2.0 and React Boilerplate 3.7.0. My whole project was mounted over the React Boilerplate ...
Read more >JupyterLab Changelog — JupyterLab 3.6.0b0 documentation
Recommend trying prebuilt extension version in the build failure dialog #11476 (@krassowski) ... Use standard hash type in webpack build #11234 (@blink1073).
Read more >Problems while analyzing webpack config file : WEB-43489
Can't analyse webpack2.config.js: coding assistance will ignore module resolution rules in this file. Possible reasons: this file is not a valid webpack ......
Read more >ionic-app-scripts-plus - NPM Package Overview
Version : 3.2.8 was published by yoneyy. Start using Socket to analyze ionic-app-scripts-plus and its 28 dependencies to secure your app from ...
Read more >frsource/cypress-plugin-visual-regression-diff
Perform visual regression test with a nice GUI as help. Only for Cypress!. Latest version: 3.2.8, last published: 7 days ago.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For people using webpack, the easiest option is to alias
jquery.validate
in the resolve block of webpack. Below tested with Webpack 4 (latest) and latest versions of both jquery-validation and jquery-validation-unobtrusive. This way there is no need to hack thejquery-validation-unobtrusive
package files, and when the offending lines are fixed in a next release your webpack build will keep working.Since CI/CD is not implemented, when will this fix be pushed to npm?