I had this error with JHipster v7.9.3 after generating code using my blueprint. The below worked for me, based on the above answer:
I edited the blueprint client folder's package.json.ejs
, per below:
"devDependencies": {
...
<%_
// Saathratri Modification:
_%>
"webpack": "<%= dependabotPackageJson.devDependencies['webpack'] %>",
<%_
// Saathratri Modification end.
_%>
...
}
and commented out:
<%_
// Saathratri Modification:
// "overrides": {
// "webpack": " dependabotPackageJson.devDependencies['webpack']"
//},
_%>
Now I get the following after running npm ls webpack
from within my generated project's directory:
saathratri-app-holder@ /Users/amar/workspace/saathratri-app-holder
└─┬ organizationsservice@0.0.1-SNAPSHOT -> ./organizationsservice
├─┬ @angular-devkit/build-angular@14.2.1
│ ├─┬ @angular-devkit/build-webpack@0.1402.1
│ │ └── webpack@5.74.0 deduped
│ ├─┬ @ngtools/webpack@14.2.1
│ │ └── webpack@5.74.0 deduped
│ ├─┬ babel-loader@8.2.5
│ │ └── webpack@5.74.0 deduped
│ ├─┬ css-loader@6.7.1
│ │ └── webpack@5.74.0 deduped
│ ├─┬ less-loader@11.0.0
│ │ └── webpack@5.74.0 deduped
│ ├─┬ mini-css-extract-plugin@2.6.1
│ │ └── webpack@5.74.0 deduped
│ ├─┬ postcss-loader@7.0.1
│ │ └── webpack@5.74.0 deduped
│ ├─┬ sass-loader@13.0.2
│ │ └── webpack@5.74.0 deduped
│ ├─┬ source-map-loader@4.0.0
│ │ └── webpack@5.74.0 deduped
│ ├─┬ stylus-loader@7.0.0
│ │ └── webpack@5.74.0 deduped
│ ├─┬ webpack-dev-middleware@5.3.3
│ │ └── webpack@5.74.0 deduped
│ ├─┬ webpack-dev-server@4.10.0
│ │ └── webpack@5.74.0 deduped
│ ├─┬ webpack-subresource-integrity@5.1.0
│ │ └── webpack@5.74.0 deduped
│ └── webpack@5.74.0 deduped
├─┬ browser-sync-webpack-plugin@2.3.0
│ └── webpack@5.74.0 deduped
├─┬ copy-webpack-plugin@11.0.0
│ └── webpack@5.74.0 deduped
├─┬ eslint-webpack-plugin@3.2.0
│ └── webpack@5.74.0 deduped
└─┬ webpack@5.74.0
└─┬ terser-webpack-plugin@5.3.7
└── webpack@5.74.0 deduped
Notice the correct Webpack version is being used - the one that should be used according to JHipster v7.9.3; the correct version of Webpack is 5.74.0 for JHipster v7.9.3.
All references to webpack@5.79.0 from the npm ls webpack
command were no longer there and the parser.destructuringAssignmentPropertiesFor is not a function
error went away when running ./mvnw clean package
or ./mvnw spring-boot:run
from the generated project's directory.