ERROR in NaN but they point to different modules. ... Webpack cannot distinguish on context and would fail to load the proper one

Viewed 1677

ERROR in NaNbut they point to different modules "(/Users/USER/eclipse-workspace/nms/bin/main/webapp/app/admin/admin.module.ts and "/Users/USER/eclipse-workspace/nms/src/main/webapp/app/admin/admin.module.ts"). Webpack cannot distinguish on context and would fail to load the proper one.

I have done ./gradlew -Pprod And with ./gradlew -Pprod --debug --info --scan --stacktrace Gives this error: https://scans.gradle.com/s/czc6mol6ipsg6

Works well with ./gradlew and ./gradlew -Pdev bootWar

node version v10.13.0

jhipster version Using JHipster version installed locally in current project's node_modules 5.6.1

yarn --version 1.12.3

MacOS 10.12.6

Any Suggestion ?

2 Answers

I got similar error after upgrading JHipster from 5.7.2 to 5.8.2
Finally I deleted ./bin/ folder and it resolve the problem.

I was face same problem on my application and Finally I got a solution from Github issue in angular-cli Project. It's working fine for me. Working code:

export const ROUTES: Routes = [
     {
         loadChildren: "../<whatever the folder name of parent module>/admin/admin.module#AdminModule",
         path: "admin",
     },
];
Related