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

瘦欲@ 提交于 2021-02-08 17:24:43

问题


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 ?


回答1:


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.




回答2:


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",
     },
];


来源:https://stackoverflow.com/questions/53266712/error-in-nan-but-they-point-to-different-modules-webpack-cannot-distinguish

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!